WaitForColor

Z Wiki
Přejít na: navigace, hledání
Toto je přeložená verze stránky WaitForColor, překlad je hotový z 99 %.

Jiné jazyky:
English • ‎čeština

Description

Alias: WFC

Waits for the pixel color at Reference1 or anywhere in the area defined by two references.

Repeatedly searches the screen for Bitmap1, or Bitmap2 if specified. Once found, and depending on the value of the WaitMode, it waits for the desired Color to appear or disappear at the location of Reference1 or (in the case of two bitmaps) in a rectangular area delimited by both references. To search for reference bitmaps, timeout can be set using Wait, to skip multiple occurrences using Skip1 or Skip2, and to mask the search by using MaskMode1, BitmapMaskColor1 and ScreenMaskColor1 or MaskMode2, BitmapMaskColor2 and ScreenMaskColor2. The search area is specified by the value of the CaptureMode. If none of the bitmaps is found, the command ends in error.

Input parameters

Bitmap1

Type Bitmap

Reference bitmap for the location where the desired color or first corner of the area appears.

Reference1

Type Reference

Reference for the location where the desired color or first corner of the area appears.

Bitmap2

Type Bitmap

Reference bitmap for the second corner of the area. If not specified, the color will be detected in the pixel specified by Reference1.

Reference2

Type Reference

Reference for the second corner of the area.

Color

Type Color

Desired color.

WaitMode

Type Number

Color wait mode (0=wait to display, 1=wait to disappear).

MaskMode1

Type Number

Mask mode used for detecting Bitmap1 (0=none, 1=user mask, 2=automatic mask).

BitmapMaskColor1

Type Color

Key color of the user mask in Bitmap1 (used only for MaskMode1=1).

ScreenMaskColor1

Type Color

Key color of the user mask for the capture, matching the color of BitmapMaskColor1. You should set this value only if these two colors are different.

MaskMode2

Type Number

Mask mode used for detecting Bitmap2 (0=none, 1=user mask, 2=automatic mask).

BitmapMaskColor2

Type Color

Key color of the user mask in Bitmap2 (used only for MaskMode2=1).

ScreenMaskColor2

Type Color

Key color of the user mask for the capture, matching the color of the BitmapMaskColor2. You should set this value only if these two colors are different.

Skip1

Type Number

Specifies the number of times Bitmap1 was skipped during the search.

Skip2

Type Number

Specifies the number of times Bitmap2 was skipped during the search.

Wait

Type Number

Waiting time in seconds for the detected bitmaps to appear.

CaptureMode

Type Number

Defines the search area of Bitmap1 and Bitmap2 (0=desktop, 1=active window, 2=active region, 3=active window area, 16=client part of the active window, 257-264=monitor 1-8, 512-520=active region 0-8).

Enabled

Type Number

Enables or disables the command. If the value is 0, the command will not execute.

PreWait

Type Number

Delay in milliseconds before executing the command. It has no effect if Enabled=0.

PostWait

Type Number

Delay in milliseconds before executing the command. It has no effect if Enabled=0.

Output parameters

See also

Examples of use

Using masks

Capture modes

Resolving multiple occurrences of the detected bitmap

Timeout and system parameters