Mouse movement/clicking

Okay… so i’m trying to get my mouse to move and click… move and click… over and over again in the exact same places… i’ve tried reading up on what i can… downloading various programs… and it just doesn’t work… I can’t even get my cursor to budge… Any help… at all would be appreciated

To be more exact… I’m trying to do this

Download and Install AutoHotKey

This will be the basic script you’ll be using:

Loop{

MouseClick, right, XXX, YYY ;

Sleep 2000 ;

Send {ESC} ;

Sleep 500 ;

}
^!p::Pause

autohotkey is a windows only program so i have no idea how i can get the same effect from my mac.

Hi thatboss

you could try Extra Suites

http://osaxen.com/files/extrasuites1.1.html

this has the below commands, which is what your after,

ES move mouse
ES click mouse

something like the below should do.

tell application "Extra Suites"
	ES move mouse {700, 270}
	ES click mouse
end tell

Budgie

thank you. finally it’s responding :slight_smile:

now is there a way to loop this so i don’t have to keep running it manually?

EDIT: also how do you right click?

try something like the below

set x to 5 – adjust amount of times to repeat
repeat until x = 0
tell application “Extra Suites”
ES move mouse {700, 270}
ES click mouse
end tell
delay 1
set x to (x - 1)
end repeat

Budgie

perfect. you are quite the scribe. now i just need to know the command to execute the escape key

so one last script. here is what i need.

Mouse movement to xxx,yyy, mouse right click. delay 2 seconds. escape key.
this action repeated x number of times

this could do it

tell application "System Events"
	key code 53  --escape key
	-- or --
	--keystroke escape key
end tell

Budgie

anyone know how to command a right click instead of just a regular click? the script above works perfectly i just need it to right click instead

Right click is the same as clicking with Control down, so you could do this:

tell application "System Events"
key down control
end tell
    tell application "Extra Suites"
        ES click mouse
    end tell
tell application "System Events"
key up control
end tell

Are you sure there isn’t a better way to accomplish your goal than gui scripting?