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
Type Number
Mask mode used for searching for 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 searched bitmaps to appear.
CaptureMode1
Type Number
Defines the search area of Bitmap1 (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).
CaptureMode2
Type Number
Defines the search area of 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
Typ Number
Prodleva v milisekundách po provedení příkazu. Nemá žádný vliv je-li Enabled=0.