I've just re-installed Dan's [KMFAM] Favorite Actions and Macros with plans to use it again going forward and notice quite a few variables with a kmfam prefix. I also continue to use JMichaelTX's [KM] [DELETE All Variables Except Those on Keep List] and wonder if all the other kmfam variables not prefixed with DND__ are safe to delete and exclude from the DND__KM_Vars_To_Keep list?
Additionally, its still not clear what variable names to list in JMichaelTX's macro "Keyboard Maestro Delete Variables Except Those On Keep List". I've listed the two below with and without the DND__ prefix, but his macro deletes them. So, on the next run of your utility, I have to again report/declare the KMFAM Resources folder path.
Just to add clarity to how Variables work with Keyboard Maestro:
You delete a variable by setting it to the empty string. At that point it is removed from the variables database.
Keyboard Maestro will show you variables that have values as well as variables you use in any macro in the Variables preference pane, and in Variables popup menus and Insert Variable by Name or Insert Variables menu.
You can actively hide a variable from those displayed locations by setting its value to the special token %Delete%. However this does not delete the variable from the database, in fact the opposite, it ensures it is in the database with this special value.
For variables you want to delete at the end of the macro, perhaps you should move to using Local or Instance variables?
Peter, I hope you can appreciate contradiction in terms that this presents.
At this point, I see no value in the %Delete% token.
Yep, this is what I now do. For all new Macros I've written since KM 8.0.2, I've used Local/Instance variables, unless I want the variable to persist across executions and macros. Then, I prefix these with "DND_".
The major downside of this is that there is no easy way to inspect Local/Instance variables while debugging a macro. It would sure be nice if the KM Debugger would show Loca/Instance variables, like most debuggers I have ever used.
Yes, and no. It does not delete the variable, it deletes the variable from the Popup menus and Preferences and such.
The purpose of the token is to hide variables from the Popup menu that selects Variables.
Yes, it would, and yes it is a pain, but currently that is unlikely any time soon I'm afraid.
The solutions are to use tools like Log and Display Text and such to display the variables as necessary. It is not ideal, but it is what it is. If it is any consultation (probably not) it is how I generally debug Keyboard Maestro since the debugger generally does not show me variables there either.