hwISession CaptureScreen

Captures the current screen to an image file.

Syntax

hwISession_handle CaptureScreentype, filename, quality

Application

HyperWorks Tcl Query

Inputs

type
The type of file. Options include: BMP, JPEG, TIFF, PNG, Clipboard
filename
The filename of the captured image.
quality
The level of quality or compression (default is 100).

Example

To capture the screen to a JPEG type file called MyPicture.png with a quality level of 60:
hwi GetSessionHandle sess;
sess CaptureScreenToSize jpeg MyPicture.jpg 60;
To capture the screen and copy it to the clipboard with the default quality level of 100:
Note: A dummy file name must be specified.
hwi GetSessionHandle sess1
sess1 CaptureScreen "clipboard" E:\Scratch\CaptureScreenAPI_Test 100 

Error

Success (0) or an error code.