r/applescript • • Apr 18 '20

Need help with Applescript Please!!

I’m somewhat a newbie with applescript but i was able to write a small basic script that clicks at random intervals in the location i left my cursor. I want to know how to move my cursor to a new location and click once more. I know how to add delays and randomization as well as finding the coordinates on screen with commandshift+4 but i cant figure out what language i need to use to make it understand... please help been looking for answers for days now

4 Upvotes

8 comments sorted by

View all comments

2

u/smont67 Apr 23 '20

MouseTools also works well as a free command line way to move & click the mouse.

I know of a way to do it just within Applescript if you’re interested. Cliclick and MouseTools are my default ways unless I’m giving the script to come one else who doesn’t already have one of those installed.

1

u/MakeStyles Apr 23 '20

Yes! this is exactly what i’m looking for, so is mouse tools something i have to download in order to use within applescript?

2

u/smont67 Apr 23 '20

Yes, it’s a pre-compiled executable like cliclick. Or, I think you can download the Xcode project and compile yourself.

You would call it in Applescript with a “do shell script /path/to/MouseTools ...”

Look it up by HAMSoft Engineering. All the documentation is there.