hwISession CaptureScreenByAreaPercentage

Captures the screen to an image file.

Syntax

hwISession_handle CaptureScreenByAreaPercentagetype, filename, left, top, right, bottom

Application

HyperWorks Tcl

Description

This command captures the screen to a file, requiring you to specify or resize the window region to be captured. This version takes percentages as parameters of the screen (expressed as decimals between 0 and 1) for the input.

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 movie.
left
The left side coordinate of the captured region in terms of screen percentage (a decimal between 0 and 1).
top
The top side coordinate of the captured region in terms of screen percentage (a decimal between 0 and 1).
right
The right side coordinate of the captured region in terms of screen percentage (a decimal between 0 and 1).
bottom
The bottom side coordinate of the captured region in terms of screen percentage (a decimal between 0 and 1).

Example

hwi GetSessionHandle sess;
sess CaptureScreenByAreaPercentage png Pic.png .25 .25 .25 .25;
hwi GetSessionHandle sess1
sess1 CaptureScreenByAreaPercentage "clipboard" E:\Scratch\CaptureScreenAPI_Test .25 .25 .25 .25;

Error

Returns success (0) or an error code.

Keywords

HyperWorks

Tcl

Create