PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.

Prev | Next | Users Guide | PhantomScript Reference | P1 Systems


Windows

WaitForMatchYTolerance

Syntax

WaitForMatchYTolerance

Description

An instrinsic variable in which the image match location tolerance is specified for WaitForMatch.

Remarks

A value greater than or equal to zero should be specified. The default value is zero, which requires that the image being matched must appear in precisely the location specified in the WaitForMatch statement. If a non-zero value is specified, WaitForMatch will inspect locations offset vertically from the specified match location by up to plus and minus the value specified. Thus if a value of 2 is specified for WaitForMatchYTolerance, locations 2 pixels above to 2 pixels below the match location will be tested for a match.

If both WaitForMatchXTolerance and waitForMatchYTolerance are specified, all combinations of the specified offsets are tested. Thus the number of comparisons performed for each test interval (see WaitForMatchTestIntervalMs) is equal to the x tolerance value multiplied by the y tolerance value. It is advisable to specify low values for x and y tolerance as otherwise the CPU utilization and time required to perform the comparisons can become inordinately high.

Example

          WaitForMatchXTolerance = 2
WaitForMatchYTolerance = 1
WaitForMatch 484,26,554,94
"C:\Program Files\P1\Phantom\MatchImage-3feb.Bmp"
Timeout=5

The example sets the horizontal match tolerance to 4 pixels. Comparisons will be made for images whos left top corner is located at the following coordinates (482,25), (482,26), (482,27), (483,25), (483,26), (483,27), (484,25), (484,26), (484,27), (485,25), (485,26), (485,27), (486,25), (486,26), and (486,27).



Prev | Next | Users Guide | PhantomScript Reference | P1 Systems

PhantomScript v1.7 Reference - Copyright © 2006 P1 Systems Incorporated. All Rights Reserved.