"If Then Else" action– possible for "IF cursor over a specific application's window, THEN trigger action"?

I'm wishing to trigger an action when cursor is over windows of a specific application (or not over a specific application), instead of by what application is active or currently in front. Is this possible?

Firstly, you are talking across purposes which doesn't help.

Triggers control what event will start a macro.

Actions describe what will happen when the macro runs.

I'm not sure if there is any way to determine if the mouse is over a window belonging to a specific application - it is possible you can do it with AppleScript and the Accessibility API (@ccstone?).

But you cannot trigger a macro to run based on the mouse being over such a window (if there was a mouse moved trigger, then you could test it each time the mouse moved but that would likely be horrendous for performance). So you probably need to trigger the macro by some other means (eg a hot key) and then determine what to do.

Or accept that you probably can't do what you want to do, but I don't really know what that is.

What are you trying to do? There is probably an alternative way of doing it.

1 Like

I reckon that's awkward but doable, however as Peter mentions you cannot trigger a macro this way.