How to create a template macro and use it for different shortcuts and apps?

I have a macro that will launch an application if it is not running or activate it if already running. For example if Cltr + Shift + A launches/activates Affinity.

Now, how can I use the same macro and map keyboard shortcuts to different applications (e.g., Cltr + Shift + P -- launches Pycharm) without duplicating macros.


You can get there, to a degree. I wouldn't bother with that idea, though.

You can add multiple hotkeys to the same macro. Just press the "+" key to the left of your current hotkey trigger. Then in the body of the macro we have to "test" which hotkey was pressed. (I would use a Switch action.) That can be done with the %TriggerValue% token. Then you can launch the appropriate program.

There's even a trick to go one step further, but I won't mention it unless you try the above ideas first.

Thanks, Airy. I will try out your suggestion. I wish there was a more elegant way.