Jump to content
Sign in to follow this  

multiple MouseMove speed 0, cant get cursorinfo

Recommended Posts


$cursor[0] = basic cursor
DetectCursor() = getting cursorInfo thru user32.dll
    Local $x=1240, $y=886, $start=0, $end=0, $speed = 0
    For $i=0 to 170
        MouseMove($x, $y+$i, $speed)
        If $cursor[4]="" And DetectCursor()<> $cursor[0] Then
            $start = $y+$i
            $cursor[4] = DetectCursor()
        If $cursor[4]<>"" And DetectCursor()= $cursor[0] Then
            $end = $y+$i

I want to get the coordinate of where the cursor began to change shape over a button

Result should be $start=900 and $end=1000 but it ended up as $start=0 and $end=0

Could anyone give me a hint, thanks in advance

It works fine if I set the speed of the cursor movement to 2 or above

If I set the speed to 1, it will miss 1 pixel, so the result wud be 901 to 1001

Edited by danny1878

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