Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- get the current mouse coordinates (measured from top-left corner of screen)
- --set mouseToolsPath to "Volumes:Macintosh HD 2:Henri:Softwares:MouseTools" & "UnixBins:MouseTools"
- set mouseToolsPath to "Volumes:Macintosh HD 2:Henri:Softwares:MouseTools:MouseTools"
- --delay 3 -- 3 seconds after starting the script to move the mouse where you want
- set {x, y} to paragraphs of (do shell script quoted form of POSIX path of mouseToolsPath & " -location")
- do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x + 50) & " -y " & y
- do shell script quoted form of POSIX path of mouseToolsPath & " -rightClick"
- tell application "System Events"
- --click at {x, y}
- delay 1
- --display dialog "macarena = " & x & ", " & y
- end tell
Advertisement
Add Comment
Please, Sign In to add comment