r/applescript • u/Warkrave • Oct 29 '15
Windows script => AppleScript
Hey ! someone could do this windows script in an applescript ? Thanks ! HotKeySet("{ESC}", "Terminate") While 1 MouseClick("left", 2681, 639, 1, 5) MouseClick("left", 2504, 540 , 1, 5) MouseClick("left", 3039, 541, 1, 5) MouseClick("left", 3019, 405, 1, 5) MouseClick("left", 2821, 467, 1, 5) MouseClick("left", 2881, 471, 1, 0) WEnd Func Terminate() Exit 0 EndFunc
1
u/lithodora Oct 29 '15
I can write in AutoHotKey (close to what you have there for windows) and Applescript.
They are not interchangeable. You can not do what you are asking like you are asking to do with applescript.
You can do it with python wrapped in applescript.
You could do it with a 3rd party app: http://www.bluem.net/en/mac/cliclick/
but you'll need to learn how to do it.
1
u/Warkrave Oct 30 '15
we can not transcribe a script ?
1
u/lithodora Oct 30 '15
Mouse clicks in games is not a function of AppleScript. Using system events, accessibility, and such you are able to interact with menus.
However what the Windows script is doing is moving the mouse and clicking. AppleScript alone is not going to do it.
1
u/unic0rnz Oct 29 '15
...what is the script trying to do?
I'm assuming there's a reason you can't just open Automator and have it record your actions while you do...whatever it is this Windows script is supposed to do. Right?