View Full Version : Generate Mouse Event with applescript
mason.kramer
May 6, 2008, 12:51 PM
Hi. I'm playing a computer game that allows me to advance in a certain way if I could only repeatedly click a mouse button once per second for hours on end. For reasons unknown to me, I actually want to do this. I don't know much about applescript, but I from what I understand about applescript, this is the kind of thing that applescript is actually good at. Can anyone give me a script that, when run, will just click my mouse repeatedly, whereever the cursor happens to be placed? Or perhaps direct me to some documentation about applescript and mice?
MongoTheGeek
May 6, 2008, 03:24 PM
Hi. I'm playing a computer game that allows me to advance in a certain way if I could only repeatedly click a mouse button once per second for hours on end. For reasons unknown to me, I actually want to do this. I don't know much about applescript, but I from what I understand about applescript, this is the kind of thing that applescript is actually good at. Can anyone give me a script that, when run, will just click my mouse repeatedly, whereever the cursor happens to be placed? Or perhaps direct me to some documentation about applescript and mice?
tell application "System Events"
tell process "World Of Warcrack"
click at {10, 10}
end tell
end tell
coordinates are x,y in quadrant 3 (i.e. 0,0 is top left)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.