Jump to content

Recommended Posts

Posted

My question refers to the PixelChecksum statement. I know that the statement is used to determine if the selected region has changed, then the script continues. Is there a way to use PixelChecksum to, instead of determining when the selected region has changed, to determine when the selected region has gone back to normal?

Thank You Very Much.

Posted

$checksum = PixelChecksum(0,0, 50,50)
; Wait for the region to change, the region is checked every 100ms to reduce CPU load
While PixelChecksum(0,0, 50, 50) = $checksum
  Sleep(100)
WEnd

MsgBox(0, "", "Something in the region has changed!")

; Wait for the region to change back, the region is checked every 100ms to reduce CPU load
While PixelChecksum(0,0, 50, 50) <> $checksum
  Sleep(100)
WEnd

MsgBox(0, "", "Region has changed back!")

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
×
×
  • Create New...