I just started using autohotkey and have a question. What I want to do is assign a hotkey to move the mouse cursor from its current position to a postion a little bit to the left (a value of say 10). So I did the following
#n::mousegetpos, xpos, ypos
envset, xps, %xpos% - 10
mousemove, %xps% , %ypos%
am I even close to what this should be is this the right way to do math with a variable because the error I'm getting is that %xpos% - 10 doesn't resolve to a numeric value
any help would be appreciated
How do I use the mousemove command
Started by
stanman
, Apr 29 2004 07:43 PM
2 replies to this topic
#1
Posted 29 April 2004 - 07:43 PM
#2
Posted 29 April 2004 - 08:31 PM
You can do it two ways:
envsub, xpos, 10
or
xpos -= 10
beardboy
envsub, xpos, 10
or
xpos -= 10
#n:: mousegetpos, xpos, ypos envsub, xpos, 10 mousemove, %xpos% , %ypos% returnthanks,
beardboy
#3
Posted 30 April 2004 - 01:34 PM
Thanks beardboy
I tried the code and its working fine
its simpler to use just one the variable too
Thanks again
I tried the code and its working fine
its simpler to use just one the variable too
Thanks again




