-
All replies
-
Helpful answers
-
Jun 11, 2015 4:44 PM in response to Max Curiousby Roote,If you download Carsten Blüm's Cliclick @ https://www.bluem.net/en/mac/cliclick/ and install it into /usr/local/bin you can run this command in Script Editor to left click the current position of the mouse cursor:
do shell script "usr/local/bin/cliclick c:."
The "c" is the command identifier for clicking, the "." or period is the command argument, and the ":" or colon separates the two. The following command is equivalent and uses relative zero values instead:
do shell script "usr/local/bin/cliclick c:+0,+0"
Since Cliclick is a command-line tool, you can use this command in Terminal to do the same thing:
cliclick c:+0,+0
Another tool you can use is PyMouse, now a part of PyUserInput. You can download it from GitHub @ https://github.com/SavinaRoja/PyUserInput. Install instructions @ https://github.com/SavinaRoja/PyUserInput/wiki/Installation. To use in Script Editor, you can use this command to left click the current position of the mouse cursor:
do shell script "
/usr/bin/python <<END
from pymouse import PyMouse
m = PyMouse()
pos = m.position()
m.click(pos[0], pos[1])
END"
-
Sep 13, 2015 8:19 AM in response to Rooteby richardfromcascais weymouth,This is easy to implement and understand
on ChromeButtonsEasy(TheTargetURL, TheTargetButtonId)
(*below to be duplicated and placed before "my ChromeButtonsEasy(TheTargetURL, TheTargetButtonId)"*)
(*set TheTargetURL to "Blank_1"
set TheTargetButtonId to "Blank_2"*)
(* Replace Blank_1 with url of your target page by copeying the address bar
Replace Blank_2 by using right click in chrome on the button and copying snippett after id *)
tell application "Google Chrome"
if not (exists window 1) then reopen
activate
tell window 1 to tell active tab
set its URL to TheTargetURL
delay 3
execute javascript "document.getElementById(" & quoted form of TheTargetButtonId & ").childNodes[0].click()" --find the id by using inspect element
end tell
end tell
end ChromeButtonsEasy
-
Aug 17, 2016 7:33 PM in response to Max Curiousby thankgodforapple,Hello - Did you ever figure this out? I'm trying to do something similar, without much luck....
-
Aug 17, 2016 7:55 PM in response to red_menaceby thankgodforapple,Hello - hoping you can help. I'm using this Applescript in an attempt to click at a specific coordinate in FileMaker Pro, but very little experience here and it's not working. It will bring up the application, but not click at the coordinates. Any suggestions? I'm using FM 9 and El Capitan OS.
tell application "System Events"
tell process "FileMaker Pro"
click at {308, 355}
end tell
end tell
Thank you.