Macro Groups: Subgroups/grouping with conditions?

Hello there,
I'd like to be able to fine-tune macro activation status by group. I'm not sure if it's viable (maybe it's bad practice because of how the implementation works?), so if it's not, just shut this down.

I'd like to be able to add conditions to the macro groups the way I can add them to the if/else-statements. Basically, I'd like to achieve stuff like groups that are active when

  • app A has focus, app B is running, and app C is not running
  • app A is running, but neither app B nor app C are running
  • app A is running and the current window title contains...
  • app A is running and variable %var% contains...

I'll pin down my use case in case anyone cares, if not, consider this part of the TL;DR. Perhaps there's a different way to achieve what I want, I'd be happy to hear.

Looking forward to feedback. :slight_smile:

I'm using a Wacom drawing tablet with Photoshop. Since the driver is a little wonky at times, I've mapped the tablet's input keys to numpad1-4 and use f20 as modifier key.
If n1-4 is pressed, ps is not active and not hidden, it'll maximise photoshop and then forward the keypress.
If n1-4 is pressed and ps is active, I call applescripts, checking on the states of my modifier and the value of my variable that I set when switching tools via macro. I'm extremely flexible that way and can basically do what I want.
However, the point where I'd need to distinguish further is when the active layer is a layer mask. I'm currently having two macro groups, one of them is active if the active window title contains an @ (layer mask), the other if it doesn't. They use the same hotkeys, so I have to disable the other one.
What I'd like to have is a way to activate/deactivate macros by group inside of a group, so I can properly nest them as

  • this_group_eats_numkeys
    • photoshop is not active
    • photoshop is active
      • I'm on a layer mask
      • I'm not on a layer mask

I could probably set a variable when the active application's window title changes, but in that case I need to make sure that that one runs first...

I'm not sure whether this is what you're asking for, but it's a simple matter to use a hot key to toggle macro groups. Just use the Toggle Macro/Macro Group action. If you Insert Action By Name (command-control-a), then type "tog", you'll see the action. Use the same action repeatedly for as many groups as you'd like to enable/disable/toggle.

There are no plans to add this sort of complexity to the macro group activation.

You can use actions to manually activate and deactivate a macro group, so I would suggest you use them together with a macro that is triggered on any application launch, any application quit, any application activation, and window title change, and apply your desired rules to whether the group is active or inactive. You will also need to trigger it when “var” changes - there is no trigger for variable changed I'm afraid (that may come, but it is not in the current schedule).