How can I limit a macro to only be enabled while another macro is running? -OR- Can a running macro listen for a key tap/press rather than down?

This is long, I started asking one question but found a possible solution before posting, but then ran into an issue with that solution... so I figure I'll just leave all the context here in case it's useful to someone...

End Goal

My end goal is related to what is solved here & here where we're sending variables into a Find Image action.

In my case that find image sequence is basically running on a loop, looking for given images and acting when they are found. It's working very well, but I started playing with improving it by adding a "helper function" to modify the variables on the fly. My primary idea was to be able to press + or - to increase and decrease the fuzz as it runs, like if i notice it's not finding the target or finding too many. But I would also add other parts to the helper like watching for keystroke to cancel, pause/resume, pause and change screenshots, etc etc.

Solution 1

Originally I made a second Helper Function macro that the first Main Function macro executes. The Helper is just a While loop with If Key Down actions.

So here's an example Main Function (simplified actions for brevity)

And the original Helper

This works... kinda. The problem is that the length of a human keypress is 5-10 loops for this macro, so by using Key Down it isn't incrementing by 1, it's incrementing by 5-10. But I don't see any way to use Key Press/Tap instead when running this way, only when using a hotkey trigger.

Solution 2

So this is where I changed direction. I don't want to use a bunch of individual macros with hotkeys. Luckily I was introduced to the %TriggerValue% variable mentioned here just the other day. So I set up a new Helper Function using hotkeys and TriggerValue.

The problem now is I have a potentially irritating macro. It triggers off common keys, so I want it to be active only when the Main Function is running. This is where I'm stuck. I don't see any logic for "Macro X is running", just active and enabled. I can add a disable action to my Main Macro, but I don't want to depend on that alone, if I do a manual cancel for instance that's going to leave the Helper Enabled and Active.

Here's the current helper

You can see I tried adding some logic to make it self-disable, but that's where I need "If Macro X is running" logic.

So what am I missing? Have I overcomplicated the whole thing? Is Solution 1 the better choice and there's a way to solve the press vs down issue? How would you approach the primary goal differently or overcome the place I'm stuck?

Any help is appreciated. Thanks.