Closed ksylvan closed 9 months ago
From the output cliclick prints when invoked with -h
switch:
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”.
Thanks, @BlueM - I totally missed that. Brilliant.
I have a LG HDR WQHD external display arranged to the left of my my Macbook built-in-display.
Like this:
As a result, (0,0) is the top left of the built-in display, and the entire desktop has these dimensions:
Therefore, when I try to access a UI element at -1428,244 (on my external display), it does not work as expected, because
cliclick
interprets the "-1428" to be a relative x coordinate.My workaround was to first move the mouse to (0,0) before performing the
cliclick
action, like this:It would be cleaner if
cliclick
had an absolute positioning mode, where if I pass it coordinates like-1428,244
it does the action at that absolute position.