Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ScreenshotRect

This function will take snapshot of the area of the screen described by the first four Parameters.

Component Version macOS Windows Linux Server iOS SDK
Screenshot 1.0 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "ScreenshotRect"; Left; Top; Width; Height; Format; Quality; File Name )   More

Parameters

Parameter Description Example
Left Left 100
Top Top 100
Width Width of the rectangle 200
Height Height of Rectangle 200
Format File Format.
Currently only JPEG supported.
JPEG
Quality The quality of the image 90
File Name The desired file name.
The image is not written to disk. This file name is just added to the container for later export.
Test File.jpg

Result

Returns the image as a container value so you can assign it to a container.

Description

This function will take snapshot of the area of the screen described by the first four Parameters.
Updated for macOS 10.7 in plugin version 2.5.

Returns the image as container value, so you can assign it to a container field or save to disk with Container.WriteFile function.

Examples

Capture a portion of the screen to a JPEG

Let(
[
/*-----------------PARAMETERS--------------------*/
Left = 100;
Top = 100;
Width = 200;
Height = 200;
Format = "JPEG";
Quality = 90;
File Name = "Test File.jpg"
];
/*-------------------FUNCTION----------------------*/
MBS(
"ScreenshotRect";
Left ;
Top ;
Width ;
Height ;
Format ;
Quality ;
File Name
)
)

Capture an area of screen as picture:

Set Field [ test::test ; MBS( "ScreenshotRect"; 100; 100; 400; 300; "JPEG"; 90; "screenshot.jpg" ) ]

See also

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 18th April 2022


Screenshot - ScriptWorkspace.BringToFront