Image - Capture screen |
<AMIMAGE ACTIVITY="capture_screen" FILE="text" CAPTURETYPE="text (options)" X="number" Y="number" WIDTH="number" HEIGHT="number" RESULTDATASET="text" OVERWRITEFILE="YES/NO" /> |
Description:
Captures a screen shot of the primary screen, virtual screen, active window, specified desktop or particular region of the desktop and populates a dataset with the results.
Can be used to create a screen shot in order to demonstrate an application or program, a particular error or problem or generally to display output that needs to be shown to others or archived.
General
Property |
Type |
Required |
Default |
Markup |
Description |
Capture |
Text (options) |
No |
Primary screen |
|
The type of screen capture to perform. The available options are:
|
Specified desktop |
Number |
Yes if Capture parameter set to Specified desktop |
(Empty) |
DESKTOPNUMBER="2" |
The desktop number that the screen capture should be performed on. In a multi-monitor environment, each desktop is designated by a particular display number as specified in Windows Display Settings (e.g.,1,2). This parameter is active only if the Capture parameter is set to Specified desktop. |
Top |
Number |
Yes if Capture parameter set to Specified region |
(Empty) |
X="250" |
The top or x coordinate measured in pixels. The x coordinate is a given number of pixels along the horizontal axis of a display starting from the pixel (pixel 0) on the extreme left of the screen. This parameter is active only if the Capture parameter is set to Specified region. |
Left |
Number |
Yes if Capture parameter set to Specified region |
(Empty) |
Y="200" |
The left or y coordinate measured in pixels. This is a given number of pixels along the vertical axis of a display starting from the pixel (pixel 0) at the top of the screen. This parameter is active only if the Capture parameter is set to Specified region. |
Width |
Number |
Yes if Capture parameter set to Specified region |
(Empty) |
WIDTH="500" |
The total width of the area to capture measured in pixels. This parameter is active only if the Capture parameter is set to Specified region. |
Height |
Number |
Yes if Capture parameter set to Specified region |
(Empty) |
HEIGHT="800" |
The total height of the area to capture measured in pixels. This parameter is active only if the Capture parameter is set to Specified region. |
Image path |
Text |
Yes |
(Empty) |
FILE="c:\temp\theScreenShot.png" |
The screen capture's output path, file name and type. Supported file types are JPEG, PNG and BMP. |
Overwrite existing file |
Yes/No |
No |
Yes |
OVERWRITEFILE="NO" |
If set to YES (default), matching files found in the destination folder will be overwritten. If set to NO, an error will occur during runtime as a result of a matching file. |
Advanced
Property |
Type |
Required |
Default |
Markup |
Description |
Create and populate dataset |
Text |
No |
(Empty) |
DATASET="datasetName" |
The name of a dataset to create and populate with information regarding the captured screen. For more details, see Datasets below. |
Datasets
A dataset is a multi-column, multi-row object that contains a collection of information gathered during execution of an activity and stored in memory. This activity creates and populates a dataset with the following fields (rows):
Name |
Type |
Return Value |
theDataset.FileName |
Text |
The path and fil name the screen capture was saved to. |
theDataset.Height |
Number |
The height of the screen capture measured in pixels. |
theDataset.ImageFormat |
Text |
The format (e.g.,PNG, BMP) used to save the screen capture. |
theDataset.Left |
Number |
The left most pixel coordinate of the screen capture. |
theDataset.Top |
Number |
The top most pixel coordinate of the screen capture. |
theDataset.Width |
Number |
The width of the screen capture measured in pixels. |
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
Description: Captures an image of the active window and stores it into "c:\temp\screenshot.jpg". Also, create and populate dataset "screenshotData" with results.
<AMIMAGE ACTIVITY="capture_screen" FILE="c:\temp\screenshot.jpg" CAPTURETYPE="active_window" RESULTDATASET="screenshotData" />
|