Automate mouse clicks in OS X's Terminal #
with Carsten Blüm's cliclick 2.1, which emulates mouse and keyboard events like moving the cursor, clicking, command clicking, and more. Running it in an infinite loop like so:
while : ; do cliclick c:. ; done
came in handy for a game that required a rapid succession of clicks.
A more practical example can be found in the included "Read me.html":
cliclick c:28,11 w:500 m:28,35 w:1000 kd:alt w:1000 c:. ku:alt
- c:28,11 Click at position 28/11 (open the Apple menu)
- w:500 Wait 500 milliseconds
- m:28,35 Move the mouse to 28/35 (the first menu item, i.e.: "About this Mac"
- w:1000 Wait 1000 milliseconds (so you have time to notice that the item is highlighted)
- kd:alt Press the "alt" modifier key
- w:1000 Wait 1000 milliseconds (to give you the time to notice that "About this Mac" changed to "Open System Profiler")
- c:. Click at the current position ("." is the current mouse position, just as in Terminal, "." is the current directory)
- ku:alt Finally: release the "alt" key
/mac | Dec 21, 2012
RSS | Twitter | Archives