comeonyoureds Posted December 13, 2008 Share Posted December 13, 2008 Hello! I'm trying to detect when my application's custom cursor changes by using PixelChecksum and it is not working, for PixelChecksum returns a different value each time.Any idea why this happens? The cursor does not change at all and I've done several checks and am checking the right area. I've tried using PixelChecksum with a different area of the screen which does not change and it works fine.I'm under the suspicion that the function does not work fine for checking the cursor.Maybe it looks in the image without the cursor or something else is happening. I'd be interesting in finding out both what's going wrong here and if there are any other options to look for a cursor change or even a certain predefined cursor image.I've also tried using ImageSearch UDF and it does not find the cursor image within the window. Any help appreciated! Link to comment Share on other sites More sharing options...
cmattb Posted December 13, 2008 Share Posted December 13, 2008 Should be easy enough as long as you're using just standard Windows cursors. You don't need to do any pixel searchs (which I'm pretty sure don't see the cursor), you can just use MouseGetCursor(). Search the helpfile for "MouseGetCursor" to see what the different cursor ID numbers are. Im not sure what it will do if you are using a custom Windows theme though $cursor = MouseGetCursor() while 1 $cursor1 = MouseGetCursor() if $cursor <> $cursor1 Then MsgBox(0,"Cursor","The cursor has changed!") Exit Endif sleep(200) WEnd Link to comment Share on other sites More sharing options...
comeonyoureds Posted December 13, 2008 Author Share Posted December 13, 2008 Should be easy enough as long as you're using just standard Windows cursors. You don't need to do any pixel searchs (which I'm pretty sure don't see the cursor), you can just use MouseGetCursor(). Search the helpfile for "MouseGetCursor" to see what the different cursor ID numbers are. Im not sure what it will do if you are using a custom Windows theme though $cursor = MouseGetCursor() while 1 $cursor1 = MouseGetCursor() if $cursor <> $cursor1 Then MsgBox(0,"Cursor","The cursor has changed!") Exit Endif sleep(200) WEnd The problem is the application has custom cursors, none are recognizable by MouseGetCursor(). 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