I'm trying to create a script that, when I first start it, will grab the current coordinates of my mouse, then use those coordinates throughout the script for clicking there again.
For instance:
When I start the script, my cursor is at 555,666. Script "saves" that coordinate as, let's say "X"
Script clicks on "X"
types some things, clicks on some other things
Script again clicks on "X"
Basically: I want to pull my mouse coordinates and save them as a variable to use throughout a script.
EDIT: Got it.
MouseGetPos, xpos, ypos
Click right %xpos%, %ypos%
Sleep 100
ypos:=ypos+60
Click %xpos%, %ypos%
ypos:=ypos-60
Sleep 800
Click 53 , 243
Sleep 1300
Click right %xpos%, %ypos%
Sleep 100
ypos:=ypos+70
Click %xpos%, %ypos%
ypos:=ypos-60
Sleep 800
Click 263,453
Sleep 300
Only way I could get it to grab my first xpos/ypos and slightly change where it was clicking was to update the variable before/after clicking. Not the prettiest but damnit it works beautifully.