screenshot

screenshot ( int _X , int _Y , int _height , int _width , string _path ) : string

Take a screenshot of all a screen or a part of the screen and returns the path of the screenshot file. PNG format.

Trick

You can use ScreenRuler to measure things on your screen.

Multiscreen

If you have several screens, depending on how they are positioned, the coordinate system will consist of a mural in which they are positioned. For example, if you have two screens side by side and the first has a resolution of 800px wide, then the coordinates of the top left corner of the second screen will be (800,0).

Example

screenshotFile = screenshot(20, 20, 100, 100)

Parameters

_X (optional)

The upper left corner X value of the area to capture (in pixels). If null, it is the point (0,0) of the screen.

_Y (optional)

The upper left corner Y value of the area to capture (in pixels). If null, it is the point (0,0) of the screen.

_height (optional)

The height of the area to capture (in pixels). If null, the whole screen is taken.

_width (optional)

The width of the area to capture (in pixels). If null, the whole screen is taken.

_path (optional)

The file path of the screenshot. It is a PNG. If null, it is randomly generated in the TMP folder.