Syntax
WaitForMatch l,t,r,b <bmpfile> [MatchPercent=<percent>] [Timeout=<secs>]Description
Wait for a segment of the screen to match a previously saved image. This is typically used when matching using window caption and class is not possible.Parameters
l,t,r,b
- The left,top,right,and bottom coordinates of the screen rectangle that is to be scanned for a match.
<bmpfile>
- A Windows device-independent bitmap file containing the image to be compared with the screen recangle specified by the first parameter. This file is automatically created when theImage Match recorder function is employed.
MatchPercent=<percent>
- Optional. How close the screen image must match the file image for the wait to be satisfied. Values from 0-100 are valid. 100 indicates an exact match, while 0 indicates a complete mismatch.
Timeout=<secs>
- Optional. The period in seconds after which execution of the script will continue regardless of whether a match was found. If a timeout occurs, the variableTimedOut is set toTrue. Otherwise, it is set toFalse. If the Timeout parameter is not specified, the TimedOut variable's value is not modified. A timeout value of zero causes an immediate timeout if the matching screen rectangle is not already visible. If this parameter is not supplied, the timeout is infinite.
Remarks
The following intrinsic variables affect the behavior of WaitForMatch: WaitForMatchTestIntervalMs determines the interval between match tests and thus how quickly WaitForMatch will respond to the appearance of the desired image. WaitForMatchXTolerance and WaitForMatchYTolerance cause WaitForMatch to attempt matches in locations offset from the specified location by up to the x and y values specified, respectively.Example
WaitForMatch 390,139,487,182 Ptmcc05.bmp MatchPercent=70