hwISession CaptureDesktopByArea

Captures a portion of the desktop to an image file.

Syntax

hwISession_handle CaptureDesktopByArea type, filename, left, top, width, height, (quality)

Application

HyperWorks Tcl

Description

This command captures a portion of the desktop to an image file.

Inputs

type
The file type that you want to save the captured image as. The different file types include: BMP, JPEG, TIFF, PNG, or saved to the clipboard.
filename
The file name that you want to give the captured image.
left
The left coordinate of the region to capture, in pixels.
top
The top coordinate of the region to capture, in pixels.
width
The width of the region to capture, in pixels.
height
The height of the region to capture, in pixels.
(quality) (Optional)
The level of quality or compression that you want to make the image.

Example

hwi GetSessionHandle sess;
sess CaptureDesktopByArea png MyPic.png 25 24 1000 1000

Error

Returns success (0) or an error code.