MACRO: Automate mouse clicks and holds

These two macros are more generalized and improved versions of the macros I wrote to use in Sixty Four. It struck me that I might find use for these in other situations, so I spent a bit of time cleaning them up for general use.

One macro holds the mouse button down; the other clicks the mouse repeatedly. Both let you enable spoken reminders (at an interval you choose) that the mouse is doing something, and set an automatic timeout in case you forget to end the macro. For the macro that clicks the mouse button, you can also set the delay between clicks.

NOTE: The macro group is set to be active only in TextEdit, which is an ideal testing ground, as both clicks and holds don't do much of anything in an empty text document. You'll have to change the active app(s) for the group to reflect your actual usage.

__Mouse automatons Macros.kmmacros (37 KB)

Mouse Button Clicker screenshot

Mouse Button Down screenshot

These were written in Keyboard Maestro v11, and testing in macOS 14, so I don't know if they'll work in v10 and/or earlier macOS releases.

The most interesting part of these macros is probably the spoken announcement timer; it took me a bit of thinking to figure out how to accumulate, check, and then act on and reset a timer within a larger timer loop.

These could be useful in any game that requires repetitive mouse clicking and/or holding. They could also be modified to do whatever actions you want a certain number of times, or for a certain period of time.