Run macro on the current screen


Sometimes I've the same website open on two screens. For an online app I have created a set of macro's. How can I arrange it that the macro is only working on the screen that is currently active or let's say the screen I'm now working on? Now often the macro is running on the other screen.
Perhaps really easy but I can't find the solution here at the forum.

Thanks in advance,


Without seeing the macros, it's hard to offer advice, because we don't know what they're doing. Are they clicking on things on the screen via Found Image? Are they pressing buttons in windows via Click a Button? Something else?

Can you post one so we can get a sense of what it's doing? That would help us maybe figure out how to constrain it to the screen you want it to act on.

If you can't do that for privacy reasons, then all I can offer is some general advice. You can use If-Then statements with either Front Window or Any Window conditions to constrain where the macro runs. You could click the mouse at its current location, assuming it's over the window where you want the macro to run, before your macro starts doing anything.

But without seeing the macro, it's hard to offer much more than the above.


Hi Rob,

Thanks for your reply and advice.
In short it's copying the current url, removing some stuff from the url and replace it with a new string, so I can open a new menu of the application.

So your advice regarding click the mouse at its current location that's what I need, but how do I implement this in my macro?

Use the Move or Click Mouse action, set to the current mouse location:


Ok that I didn't think of this :face_with_hand_over_mouth:
Thanks a lot Rob!! :pray: