Sign in to follow this  
Followers 0
fataldelay

little help please

4 posts in this topic

Is there a way to detect if a cursor changes?

more than likely i will have it trigger off a function

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Look at MouseGetCursor()

Example:

;Base line
$Cursor = MouseGetCursor()

Do
    MouseGetCursor()
    
    Until MouseGetCursor() <> $Cursor 
        
MsgBox("", "Cursor", "Cursor change detected." & @CRLF & "ID: " & $Cursor)
Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Thanks for the response... for some reason it will not detect that in a game.. course the game cursor isnt like its a normal windows white cursor either wonder if that has anything to do with it

Share this post


Link to post
Share on other sites

Thanks for the response... for some reason it will not detect that in a game.. course the game cursor isnt like its a normal windows white cursor either wonder if that has anything to do with it

ok this seems to work for some reason in game....

Dim $initialCursorID = MouseGetCursor()

; Initiate Test here...

Dim $start = TimerInit()

While MouseGetCursor() <> $initialCursorID

Sleep( 10 )

Wend

MsgBox("", "Cursor", "Cursor change detected." & @CRLF & "ID: " & $initialCursorID)

now how would i move the mouse from x,y coordinates 455,581 to 757,691 until the cursor changes the minute it changes i want it to stop....

im sure i have to tell it to mouse move but im a bit unsure on how to make it stop as soon as the cursor changes

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  
Followers 0