Jump to content

PixelChecksum and cursor


Recommended Posts

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...