Generates a checksum for a region of pixels.
PixelChecksum ( left, top, right, bottom [, step [,hwnd]] )
Parameters
| left | left coordinate of rectangle. |
| top | top coordinate of rectangle. |
| right | right coordinate of rectangle. |
| bottom | bottom coordinate of rectangle. |
| step | [optional] Instead of checksumming each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1. It is not recommended to use a step value greater than 1. |
| hwnd | [optional] Window handle to be used. |
Return Value
Returns the checksum value of the region.
Remarks
A checksum only allows you to see if "something" has changed in a region - it does not tell you exactly what has changed.
Related
PixelGetColor, PixelCoordMode (Option), PixelSearch
Example
; Wait until something changes in the region 0,0 to 50,50
; Get initial checksum
$checksum = PixelChecksum(0,0, 50,50)
; Wait for the region to change, the region is checked every 100ms to reduce CPU load
While $checksum = PixelChecksum(0,0, 50, 50)
Sleep(100)
WEnd
MsgBox(0, "", "Something in the region has changed!")