Is there anyway to retrieve the deleted contents of a variable? Is there variable history?

An user error in my macro set a variable with a ton of information to nothing. Is there anyway to go back and retrieve the contents of it or is it lost forever?

Actually, the more I think about it this will probably NOT work. :frowning:, but just in case:

I'm not sure if this will work, but you might try using the File > Revert Macros to restore all of your Macros to a prior date. Whether or not that also restores the KM Variables as of the same date, I do not know.

So, I think your best bet is to restore the KM Variables database from a prior date. This would require that you have a Time Machine or other backup system that did the backup.

The KM Variables are store in a SQLite Database:
~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Variables.sqlite

Obviously, if you want to use this method, you need to first copy/backup the existing Variables, and then restore back to this file after you have retrieved the Variable of interest.

1 Like

The basic answer is that they are lost forever. As @JMichaelTX suggests, they are stored in an sqlite database, and if you quit Keyboard Maestro and Keyboard Maestro Engine, and restored that database and relaunched Keyboard Maestro, that would revert the variables.

1 Like