Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2    Statistic    FMM    Blog  

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 License
Screenshot 1.0 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No Paid
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

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


Screenshot - ScriptWorkspace.BringToFront

Feedback: Report problem or ask question.


Start Chat