Want to enable global macro except when 1 application is in front

I have a global macro that runs on all my apps.

However there is one app in which I don't want to run this global macro for. Rather than create another group (and add every single application - and remember to add new ones too - to this group), I'd like to keep the gloval macro and add a exception for this one app.

The way I'm trying to do this is - within the global macro - get the window title or application name of the front most app and then not do anything if that application name matches the one I want to ignore.

But I don't see any way to get a front most window name or application name. I can switch to an application etc - but how do I retrieve the front application/window name ?

Use the %Application% token:

https://wiki.keyboardmaestro.com/token/Application_Tokens

In particular, %Application%1% will return the name of the frontmost application. Use that in a conditional within the macro:

image

-rob.

2 Likes

Or use this "exception" setting in the Macro Group: (if I understand your problem)

image

2 Likes

Ha! I answered the question without considering the much-simpler solution available! :slight_smile:

-rob.

Except OP explicitly doesn't want to create another Group for this, and doesn't want to except all macros in the Global Group.

Given those constraints, I think @griffman's approach is the way to go.

Indeed I was aware of that, but he explicitly said that the reason he didn't want to create another group was because he didn't want to ADD a bunch of app names. The approach I offered was subtracting app names. So I thought it might meet his requirement.

1 Like

Thanks all for the super helpful and quick replies.

This case statement approach works flawlessly. Thanks very much again.

Yes -- on a second look I may be reading too much into what was stated!