Cliclick is a tiny Terminal / shell application that emulates mouseclick or series of mouseclicks (including doubleclicks or Control-clicks) at arbitrary screeen coordinates.
Hence, Cliclick is an easy to use tool for scripting / automating things that cannot otherwise be scripted.
The most simple usage scenario would be to emulate a single click. In this case, you pass two integers as arguments to cliclick, the first of which is used as x (horizontal axis) location and the second as y (vertical axis) location—with the upper left corner of the screen representing the 0/0 point.
If you need a series of click, you can pass several (whitespace-separated) pairs of x / y coordinates to cliclick. In that case, it can be useful to let your Mac pause some milliseconds between events, which can be accomplished by using option -w.
To get a doubleclick, prefix the x coordinate with a “d”, to emulate a Control-click (usually to open the contextual menu), use “c” as prefix.
· cliclick 26 11 will click the screen coordinate 26 / 11; this will have the same effect as clicking the apple menu with the mouse
· cliclick -w 50 26 11 26 33 will first click screen coordinate 26 / 11, wait 50 milliseconds and then click 26 / 33 (which will cause the “About this Mac” panel to be opened).
· cliclick 50 60 c70 80 will click at 50 / 60, then Control-click at 70 / 80
· cliclick d50 60 will doubleclick at 50 / 60
· Invoking cliclick with the -h switch (i.e.: cliclick -h) will display the help.
WARNING: Use the Cliclick software at your own risk. If for some obscure reason any damage or data loss should arise from using it, it's nobody elses problem than yours.
What's New in This Release: [ read full changelog ]
· Whenever a command expects a pair of coordinates, you may provide relative values by prefixing the number with + or -. For example, “m:+50,+0” will move the mouse 50 pixels to the right. Of course, relative and absolute values can be mixed, and negative values are possible, so “c:100,-20” would be perfectly valid. If you need to specify absolute negative values (in case you have a setup with a second display arranged to the left of your main display), prefix the number with =, for instance “c:100,=-200”.