Jump to content
Sign in to follow this  
killmenext

Move the mouse about 25 pixels to the south.

Recommended Posts

killmenext

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

Share this post


Link to post
Share on other sites
playlet

---

Edited by playlet

Share this post


Link to post
Share on other sites
killmenext

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 by killmenext

Share this post


Link to post
Share on other sites
playlet

---

Edited by playlet

Share this post


Link to post
Share on other sites
killmenext

Always glad to help, if I can.

Cheers, Playlet

Looks like it still needs some tweaking, not quite hitting where i need, but its a perfect start >_<

Share this post


Link to post
Share on other sites
killmenext

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 by killmenext

Share this post


Link to post
Share on other sites
Hawkwing

so weird, if i change it to +15 instead of .15 it now goes right instead of down.... what in the world

Umm, 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.

Share this post


Link to post
Share on other sites
killmenext

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 by killmenext

Share this post


Link to post
Share on other sites
cageman

$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.

Share this post


Link to post
Share on other sites
playlet

---

Edited by playlet

Share this post


Link to post
Share on other sites
Authenticity

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×