Is there a way to duplicate or send clicks to multiple (specific) windows or spaces?

For instance, an AutoHotkey script would look like the following to make three different clicks in three different windows.

MouseGetPos, xpos, ypos
ControlClick, x%xpos% y%ypos%, WindowA
ControlClick, x%xpos% y%ypos%, WindowB
ControlClick, x%xpos% y%ypos%, WindowC

On Windows I'd accomplish this through AutoHotkey, but that's not an option for MacOS. Is there macOS software that could replicate any of this functionality?

  • 1
    There are many apps similar tonAutoHotKey - Karabiner-Elements, ControllerMate, USBOverdrive - what specifically do you want to do so we can make a recommendation? – Allan Jan 6 at 13:36
  • I'm essentially looking for something where I have 4 instances of the same application open, either in different windows or different spaces. When I click somewhere in one instance, I want to echo that click in all other instances. – PaulVO Jan 6 at 18:01
  • I've updated the initial question with an example AutoHotkey script. Does that help? – PaulVO Jan 6 at 18:06
  • Have a look at Keyboard Maestro, it might help (at least for activities within one space/screen) – nohillside Jan 10 at 12:27
  • Good edits - I’m going to change the tags a bit so @allan and others see it – bmike Jan 10 at 12:41

The built in Automator app is the solution I'd try first.

  • The simplest thing that could work is the "watch me" and record function.
  • Automator is free and a first-party tool that ships with the OS

This function knows about windows that are open and mouse events, so simply could click the three times in the three locations you wish.

enter image description here

One nice feature past the one that is you can speed up or slow down the actions 10x so you can be careful and precise when recording and then have the replay be faster, for instance.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .