RoboTask User's Guide
Keyword Index
Home page



IconQuick Start Guide
IconSeveral practical recommendations
IconMenus
IconActions
IconTriggering Events
IconAppendix
IconOther software

© 2004-2017 Neowise.com

Wait for Pixels

Top  Previous  Next

The action waits for the change of pixels color on a screen or in an appointed window. This is a standard way to identify finishing some operation in a system: a picture or an inscription will change. Or some area of a window (or screen) will change its color.

The action pauses the executing of a task and waits for changing of pixels color on a screen or in a selected window. The action will continue to implement the task when the condition of correspondence of colors of the selected pixels is fulfilled.

You can specify a set of pixels (one or several) in this action. It is necessary to specify the required color and the tolerance  of color comparing for each pixel.

You can specify the condition of color coincidence for a set of pixels:

Match ALL of the following pixels (AND)
Match ANY of the following pixels (OR)

Thereby, you can specify the exact enough condition of changes on a screen.

If the action has not waited for implementation of the condition for a predetermined time, the action generates the error "Timeout error".

If the required window has not been found to the moment of a start of a task, the action generates the error "Window is not found"

 

Source tab

WaitForPixels1 WaitForPixels2

 

When you determine parameters of an action, at first you need to specify the source of a picture:

Window - This is a separate window. All coordinates of pixels will be determined concerning the upper left corner of this window. If you have selected the window as a source, you need to specify the window parameters.
Entire screen - This is a screen with all visible windows.

The window parameters are similar to the parameters in the actions Window Snapshot, Window Command, Window Size and Position, Window Elements loop.

 

Window Parameters Mode

Use Window parameters - Use the Window Caption and the Window Class to look for the necessary window.
Use Window Handle - This is a search for a window by a handle. The handle can be got in the loop Window Loop, from the trigger Wait for Window or some other way.
Use current window - This is a current window in a moment of the executing of the action. This mode does not require any additional parameters.

 

Use Window parameters

Window Caption.

If you want to search for a window by means of its caption, switch on this checkbox and input the expected window caption. You can input only part of the caption. In this case the action will check availability of the input part in the window caption.

Caption Must Match Exactly

If you need the exact coincidence of a window caption, switch on this checkbox.

 

Window Class.

If you want to search the window by a window class, switch on this checkbox and input the expected name of the window class. You can input only part of the name. In this case the action will check availability of the input line in the name of the window class.

Class Name Must Match Exactly.

If you need the exact coincidence of a window class, switch on this checkbox. Usually it is worthwhile to search by the whole class name, because a window class is permanent and does not change its value during the "life" of the window, unlike a caption.

 

Select Window on the Screen.

When pressing this button, you turn on the mechanism of selection a window on the screen. The window, which the mouse pointer  points on, highlights with a red frame. Meanwhile, you can use the mouse to perform some actions. To select the necessary window, press Ctrl. To cancel - press Esc. When selecting a window, the fields Window Caption and Window Class are filled in automatically.

 

Window Handle.

Input the expression containing a window handle. This parameter is used for the mode Use Window Handle. A window handle is just a number, identifier of a window in a current session of system work.

 

Pixels tab

You need to specify the pixel set for checking on this tab.

WaitForPixels3

 

 

List of pixels

You can edit a list using the buttons Add, Edit and Remove.

By means of an edit window you can change pixel parameters both manually and by means of interactive instruments.

Pixel parameters:

X, Y - It is coordinates of a pixel from the left corner. If a source of a picture is a window, coordinates are determined from the upper left corner of the screen window.

Pattern color - This is a pattern of the color with which the action will compare the color of a pixel. Color is just a number. For comfort it is written in hexadecimal.

For example, $0066FF00 or $66FF00.

In hexadecimal you can write color using 6 symbols (as RGB): the first couple (younger) is red, the second couple is green, the third couple (elder) is blue color.

Tolerance - This is an accuracy of color coincidence. The error can be changed from 0 to 255 (in hex from 00 to FF). When it is 0, it is exact color coincidence. When it is 255, it is a coincidence with any color.

Tolerance is an acceptable difference between two colors for any component RGB (Red – Green - Blue). Every component of the color can be changed from 0 to 255 (from 00 to FF in hexadecimal).

On default, the tolerance is 16.

 

Waiting

There are two options:

Timeout - It is waiting time in seconds. On default, it is 60 seconds. If the action has not found out the implementation of the condition within the timeout period, the action generates the error "Timeout error".
Infinity - This is not limited waiting time. Pay attention, if you specify an illegal condition of the checking of pixels, the task can "hang down" and it can be finished by means of the function "Kill task" only.

 

 

note Related Topics

Window Snapshot

Window Pixel

Screenshot

Screen Pixel

Color Compliance

Wait for Pixels