CaptureBitmap
Description
Alias: CB
Gets the rectangular area of the screen specified by the two references.
Searches the reference Bitmap1 and Bitmap2 on the screen, and then saves a rectangular viewport determined by the points Reference1 and Reference2 as a bitmap in the Bitmap output parameter. It is possible to set the timeout with the Wait parameter, skip multiple occurrences with the Skip1 and Skip2 parameters and specify masking ( MaskMode1, BitmapMaskColor1 and ScreenMaskColor1 or MaskMode2, BitmapMaskColor2 and ScreenMaskColor2 parameters). The search area is determined by the value of the CaptureMode parameter. If none of the bitmaps is found, the command ends with an error.
Input parameters
Bitmap1
Bitmap type
Bitmap for reference of the first corner of the viewport.
Reference1
Reference type
A reference relative to Bitmap1 specifying the first corner of the viewport.
Bitmap2
Bitmap type
Bitmap for reference of the second corner of the viewport.
Reference2
Reference type
A reference relative to Bitmap2 specifying the first corner of the viewport.
MaskMode1
Number type
Mask mode used for the Bitmap1 search (0=none, 1=user mask, 2=automatic mask).
BitmapMaskColor1
Color type
The key color of the user mask in Bitmap1 (used only if MaskMode1=1).
ScreenMaskColor1
Color type
The key color of the user mask on the captured screen corresponding to the color BitmapMaskColor1. You should set this value only if these two colors are different.
MaskMode2
Number type
Mask mode used for the Bitmap2 search (0=none, 1=user mask, 2=automatic mask).
BitmapMaskColor2
Color type
The key color of the user mask in Bitmap2 (used only if MaskMode2=1).
ScreenMaskColor2
Color type
The key color of the user mask on the captured screen corresponding to BitmapMaskColor2. You should set this value only if these two colors are different.
Skip1
Number type
Defines the number of Bitmap1 occurrences that are skipped when searched.
Skip2
Number type
Defines the number of Bitmap2 occurrences that are skipped when searched.
Wait
Number type
Timeout in seconds for the searched bitmaps to occur.
CaptureMode
Number type
Defines the search area for Bitmap1 and Bitmap2 (0=desktop, 1=active window, 2=active region, 3=area of active window, 16=active window client area, 257-264=monitor 1-8, 512-520=active region 0-8).
Enabled
Number type
Enables or disables the command. If the value is 0, the command will not be executed.
PreWait
Number type
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
PostWait
Number type
Delay in milliseconds after executing the command. It has no effect if Enabled=0.
Output parameters
Bitmap
Bitmap type
Generated bitmap.