Is it possible to create macro groups that are only available when a variable is set to a certain value?

For example, let's say that I use a specific application in different ways at different times. And when I'm using it one way, I want "Mode A" to be set, to use one group of macros, but when I'm using it another way, i want "Mode B" to be set, to use a different group of macros.

It would be cool to set up a macro to toggle between "Mode A" and "Mode B," e.g. by changing the value of a variable. I would then have two macro groups for the app, one that is active when the variable is set to "Mode A" and another that is active when the variable is set to "Mode B."

I realize this is also doable by having a single macro that starts by checking the current value of the variable, and then proceeds accordingly. But for me, it would be cleaner to do this as separate macro groups, so that you wouldn't have to shove two macros into one.

Yes, you can activate and deactivate Groups and you can set up a Macro that toggles the Groups like the below. Each time the Macro is run it activates one of the two groups and deactivates the other one, toggling between the two.

Toggle activate-deactiate Groups.kmmacros (4.5 KB)

Click to Show Image of Macro

2 Likes

Exactly what I was looking for. Thanks, @Zabobon!