danny1878 Posted January 18, 2010 Share Posted January 18, 2010 (edited) $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() EndIf If $cursor[4]<>"" And DetectCursor()= $cursor[0] Then $end = $y+$i ExitLoop EndIf Next --------------------------------------------------------------------------- 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 January 18, 2010 by danny1878 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