Build List of Variables to Delete

Build List of Variables to Delete

** Updated May 29, 2016 2:05PM PDT - Fixed a bug where the "Found these matches" prompt popped up even if no matches were found.

Build List of Variables to Delete.kmmacros (20.4 KB)

PLEASE READ THE COMMENTS IN RED IN THE MACRO.

This is my first stab at this.

When a macro finishes executing, it's good practice to "clean up" the variables used in the macro; at least, the variables that you no longer need.

With the help of a variable naming convention that you supply, this macro will parse the current or selected macro and produce a list of variables that should be deleted. It displays the result and optionally copies them to the clipboard.

Comments, criticism, improvements will be appreciated. Use this in conjunction with:

1 Like

Update to fix small inconsequential bug that caused the “Found these matches” prompt to pop up even if no matches were found.

Dan, is there some reason you did not include this in you list of macros in your Github?

Yes, because I’ve got a better version started, but I keep putting off finishing it.

I suppose if I’m ever going to get through all 250 or more actions/conditions, I’m going to have to make a point of work on it a little each day. Otherwise it’s never going to happen.

So that’s my new goal.

Thanks for noticing! By the way, I have some updates for the Github repository, but I was working on a macro to make sure I applied all my code changes properly, and while working on that, I got sidetracked on another macro, and then another… It just never ends!