I've made a hot-key macro to use the escape key like a light-switch of sorts— to, depending on what is selected, either enable a disabled action, disable an enabled action, enable a disabled macro, or disable an enabled macro. I've done this with nested If-Then's. My first inclination was to use a switch but 1) distinguishing each case requires two conditions to be met, and 2) the conditions I'm using are menu conditions which I learned aren't available in switches.
It works, but with a lag of several seconds– Long enough that it's not really a shortcut, currently.
Willing to guess one of the advanced experts here will have insight I'm missing as to how to make this run faster.
Yes, there are much faster ways to do this. The way I go about it is with a straightforward regex that uses the appropriate menu item regardless of what's currently selected:
I have been using this RegEx Macro all week its fantastic.
Trying to re-purpose it to Expand / Collapse actions, I've adjusted it but truthfully I don't know anything about RegEx so I must have missed a step. Anyone know what I missed?
I think you can do this for Expand/Collapse Actions without Regex. The reason we're using Regex for enabling/disabling actions/macros/groups is because those all share one menu item that changes depending on which one of those things is selected, and whether or not it's enabled.
Expand and Collapse actions on the other hand are two separate menu items that both always exist and are enabled/disabled (Note: I might be wrong about those terms, it might be marked/unmarked or something else), depending on what is selected. So I'm speculating that you'd be able to map them to the same hot key by creating a toggle that switches based on which of the two is enabled or marked.
Not sure if I'm making sense, but hope this helps.