Send clicks to multiple windows / spaces 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.

f2::
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?
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.





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.