One of the most annoying parts (for me) is to add Set variableX to %Delete% at the end of a macro.
It'd be useful to automate this.
How: As an action that I could place at the end of a macro, so it automatically deletes all the variables set in a macro.
Hi @hello,
There has been a fair bit of previous discussion surrounding KM variables - particularly about identifying them so that they can be renamed as a "bulk" operation. The conclusion I drew from these discussions is that there are so many ways that variables can be named, created, referenced and used in KM that such a task (just identifying them) would be impossible!
My suggestion to you would be what I now do: wherever possible use Local and Instance variables in your macros as these are automatically deleted when the macro finishes: problem solved!!
BTW - did you know that setting a variable to %Delete% doesn't actually delete it from the KM system? All it does is stop it appearing in the Variables Inspector. Of course, if a variable had the text of War & Peace stored in it, then it makes a lot of sense to replace that with %Delete% as it takes up much less room.
Here's a peek inside my Keyboard Maestro Variables.sqlite file in the KM Applications Support folder on my Mac: