SetActiveRegion
Description
Alias: SAR
Sets the active region of the screen.
Sets the active region of the screen with the RegionId number for use in the CaptureMode=2 (or 512-520) viewport in subsequent commands. The area is specified by two points Reference1 and Reference2 relative to Bitmap1 and Bitmap2. To search for reference bitmaps, the maximum waiting time 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. Search areas are specified by the values of CaptureMode1 and CaptureMode2. If any of the bitmaps is not found, the command ends in error.
Input parameters
Bitmap1
Type Bitmap
Bitmap reference of the first corner of the viewport.
Reference1
Type Reference
Reference relative to Bitmap1 specifying the first corner of the viewport.
Bitmap2
Type Bitmap
Bitmap reference of the second corner of the viewport.
Reference2
Type Reference
Reference relative to Bitmap2 specifying the second corner of the viewport.
RegionId
Type Number
Number of region. Admissable values are from 0 to 8.
MaskMode1
Type Number
Mask mode used for searching for 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
Typ Number
Mask mode used for searching for Bitmap2 (0=none, 1=user mask, 2=automatic mask).
BitmapMaskColor2
Typ Color
Key color of the user mask in Bitmap2 (used only for MaskMode2=1).
ScreenMaskColor2
Typ Color
Klíčová barva uživatelské masky na sejmuté obrazovce, odpovídající barvě BitmapMaskColor2. Tuto hodnotu je třeba nastavit jen v případě, že se tyto dvě barvy liší.
Skip1
Typ Number
Určuje počet výskytů bitmapy Bitmap1, které se při vyhledávání přeskočí.
Skip2
Typ Number
Určuje počet výskytů bitmapy Bitmap2, které se při vyhledávání přeskočí.
Wait
Typ Number
Doba čekání v sekundách na výskyt hledaných bitmap.
CaptureMode1
Typ Number
Definuje oblast vyhledávání bitmapy Bitmap1 (0=desktop, 1=aktivní okno, 2=aktivní region, 3=oblast aktivního okna, 16=klientská část aktivního okna, 257-264=monitor 1-8, 512-520=aktivní region 0-8).
CaptureMode2
Typ Number
Definuje oblast vyhledávání bitmapy Bitmap2 (0=desktop, 1=aktivní okno, 2=aktivní region, 3=oblast aktivního okna, 16=klientská část aktivního okna, 257-264=monitor 1-8, 512-520=aktivní region 0-8).
Enabled
Typ Number
Povoluje nebo zakazuje příkaz. Při hodnotě 0 nebude příkaz proveden.
PreWait
Typ Number
Prodleva v milisekundách před provedením příkazu. Nemá žádný vliv je-li Enabled=0.
PostWait
Typ Number
Prodleva v milisekundách po provedení příkazu. Nemá žádný vliv je-li Enabled=0.