Wait for Pixel Action

Declaration

<AMWAITFORPOINTER ACTION="text [options]" XPOS="list" YPOS="list" COLOR="list">

See Also

Wait for Window, Wait for Pointer, Wait for File, Wait for Process, Close Window

Description

Causes task execution to pause at the current line until the specified pixel(s) match(es) or differ(s) the color value(s) specified.

Practical Usage

Commonly used to wait for a graphic or area of the screen to match (or stop matching) a "checksum" of pixel colors. Very useful for detecting subtle changes in a window's contents that cannot be measure by any other means. In visual mode, it is easy to create the checksum values, while in the properties of the action, simply move the mouse pointer around the target window while repeatedly pressing the INSERT key.

Parameters

General Tab

Action
Text, optional default match
MARKUP: ACTION="differ"

Specifies whether to wait for the pixel(s) to match the specified color(s), differ from the specified color(s), or change to any other color.

The available options are:

match: Wait until the pixel color(s) match the pixel(s) specified in the corresponding XPOS, YPOS and COLOR parameter.

differ: Wait until the pixel color(s) do not match all of the pixel(s) specified in the corresponding XPOS, YPOS and COLOR parameter.

any: Wait until (at least one of) the pixel(s) change(s) color from the colors of the specified pixel(s) at the time the step begins execution.

X Pos
Text, Required
MARKUP: XPOS="36"

Specifies the X coordinate of the pixel(s) to watch for. Multiple pixels/color pairs may be specified by separating the entries with commas. All parameters must have the same number of items specified (unless Action is any [ACTION="any"] in which case color is omitted).

Y Pos
Text, Required
MARKUP: YPOS="36"

Specifies the Y coordinate of the pixel(s) to watch for. Multiple pixels/color pairs may be specified by separating the entries by commas. All parameters must have the same number of items specified (unless Action is any [ACTION="any"] in which case color is omitted).

Color
Text, Required
MARKUP: COLOR="13160660"

Specifies the color(s) that the corresponding pixels specified in XPOS and YPOS should be. Multiple pixels/color pairs may be specified by separating the entries with commas. All parameters must have the same number of items specified (unless Action is any [ACTION="any"] in which case color is omitted).

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example

<AMWAITFORPIXEL XPOS="480" YPOS="492" COLOR="13160660">

<AMWAITFORPIXEL XPOS="480" YPOS="492" COLOR="13160660">

<AMWAITFORPIXEL ACTION="differ" XPOS="480" YPOS="492" COLOR="13160660">