Wait for Pixel Action

Declaration

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

See Also

Wait for Pixel Action-Setting Properties, Wait for Window, Wait for Pointer, Wait for File, Wait for Process, If Pixel Exists Action

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:

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

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

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, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

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

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

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