killmenext Posted August 15, 2009 Share Posted August 15, 2009 What would I need to add to my code in order to move the mouse down about 25px to the south somewhere in my code? Here is where I need it. While 1 $Variable = 0 Sleep ( 2000 ) Send( "R" ) Sleep ( 500 ) Call( "Unburden" ) ;<================ Here is where I want to add the code to move the mouse Do Call( "HealOther" ) $Variable = $Variable + 1 Until $Variable = $Unburden Sleep( 2000) Call( "Refreshweapon" ) Sleep( 2000 ) Call( "Unburdeon" ) Sleep( 2000 ) Call( "Rest" ) WEnd Link to comment Share on other sites More sharing options...
playlet Posted August 15, 2009 Share Posted August 15, 2009 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
killmenext Posted August 15, 2009 Author Share Posted August 15, 2009 (edited) If you ment from the current mouse position, then this is it: $a = MouseGetPos() ; $a[0] = x-pos (horizontal), $a[1] = y-pos(vertical) MouseMove($a[0], $a[1]+25, 0) I appreciate it, it was close, looks like it was a little off I had to change it to $Mouse = MouseGetPos() ; $Mouse[0] = x-pos (Verticle), $Mouse[1] = y-pos(horizontal) MouseMove($Mouse[0]-.25, $Mouse[1], 0) Greatly appreciate it though! Edited August 15, 2009 by killmenext Link to comment Share on other sites More sharing options...
playlet Posted August 15, 2009 Share Posted August 15, 2009 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
killmenext Posted August 15, 2009 Author Share Posted August 15, 2009 Always glad to help, if I can.Cheers, PlayletLooks like it still needs some tweaking, not quite hitting where i need, but its a perfect start >_< Link to comment Share on other sites More sharing options...
killmenext Posted August 15, 2009 Author Share Posted August 15, 2009 (edited) quick question when i do $Mouse = MouseGetPos() ; $Mouse[0] = x-pos (horizontal), $Mouse[1] = y-pos(vertical) MouseMove($Mouse[0]+1, $Mouse[1], 0) it moves down correctly, but way too far, when I do $Mouse = MouseGetPos() ; $Mouse[0] = x-pos (horizontal), $Mouse[1] = y-pos(vertical) MouseMove($Mouse[0]+.15, $Mouse[1], 0) it moves down almost just as far but also way to the right. Any idea? I barely need it to move down at all, like 1/2 inch total. so weird, if i change it to +15 instead of .15 it now goes right instead of down.... what in the world I keep trying different combinations, but nothing seems to get just south a tiny bit. so strange. Edited August 15, 2009 by killmenext Link to comment Share on other sites More sharing options...
Hawkwing Posted August 15, 2009 Share Posted August 15, 2009 so weird, if i change it to +15 instead of .15 it now goes right instead of down.... what in the worldUmm, your changing the x coordinate for mousemove to + 15. Of course it goes right..... The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. Link to comment Share on other sites More sharing options...
killmenext Posted August 15, 2009 Author Share Posted August 15, 2009 (edited) I have tried adjusting both in different ways, it always seems to go diagonal. if i take the original code $a = MouseGetPos() ; $a[0] = x-pos (horizontal), $a[1] = y-pos(vertical) MouseMove($a[0], $a[1]+25, 0) and change it to say +1 instead of +25 it still goes off to the top left for some reason. If i use anything small then a whole number, say +.25 it goes even weirder. I need it to move south, just only half an inch, need trying all kinda of different things, but nothing seems to get it just right. Edited August 15, 2009 by killmenext Link to comment Share on other sites More sharing options...
cageman Posted August 15, 2009 Share Posted August 15, 2009 $a = MouseGetPos() MouseMove($a[0], $a[1]+25, 0) that code should move your mouse 25 pixels lower. Im pretty sure you can't use decimal numbers in mousemove, so dont do it. Looking at your comments you need something like +5 or something, just test it. Link to comment Share on other sites More sharing options...
playlet Posted August 15, 2009 Share Posted August 15, 2009 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Authenticity Posted August 15, 2009 Share Posted August 15, 2009 MouseMove() does not move the mouse to an absolute point location but preform the move (using mouse_event or SendInput APIs) which implicitly recalculated based on mouse speed, etc..If you require to move the mouse to an absolute position consider using this instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now