HenriAugusto

Untitled

Aug 11th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- get the current mouse coordinates (measured from top-left corner of screen)
  2.  
  3. --set mouseToolsPath to "Volumes:Macintosh HD 2:Henri:Softwares:MouseTools" & "UnixBins:MouseTools"
  4. set mouseToolsPath to "Volumes:Macintosh HD 2:Henri:Softwares:MouseTools:MouseTools"
  5.  
  6.  
  7. --delay 3 -- 3 seconds after starting the script to move the mouse where you want
  8.  
  9.  
  10. set {x, y} to paragraphs of (do shell script quoted form of POSIX path of mouseToolsPath & " -location")
  11.  
  12. do shell script quoted form of POSIX path of mouseToolsPath & " -x " & (x + 50) & " -y " & y
  13.  
  14. do shell script quoted form of POSIX path of mouseToolsPath & " -rightClick"
  15.  
  16.  
  17. tell application "System Events"
  18.     --click at {x, y}
  19.     delay 1
  20.     --display dialog "macarena = " & x & ", " & y  
  21. end tell
Advertisement
Add Comment
Please, Sign In to add comment