PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Screen package guide

Save desktop, window and area screenshots on Windows.

Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested. Packages.

Jump to actions

Prerequisites

The package saves what is on a signed-in, unlocked Windows screen. Keep the window open and on top. The capture takes what is on screen, so a window in front shows in the image. A hidden window is not drawn. A window capture includes the window frame.

Use samples/shots/ for test captures. The file extension sets the image format.

Shared fields

Actions

Capture area (screenCaptureArea)

Saves a part of one window. Values are whole pixels from the window's top-left corner. An area larger than the window is cut to the window.

Window-relative crop at left 10 and top 20, with width 50 and height 40, saved as a PNG.
Illustration, not to scale: measure left and top from the window's outer top-left corner. This example saves a 50 by 40 pixel PNG. View full size

Inputs

InputEditor fieldType and runtime defaultUse
windowTitleSelect windowString⁠; ""Optional. Window.
windowMatchMatch the titleTitleMatch⁠; ContainsOptional. Title matching.
leftArea left (px from the window)Number⁠; 0Optional. Pixels from the window's left edge.
topArea top (px from the window)Number⁠; 0Optional. Pixels from the window's top edge.
widthArea width (px, 0 = to the window edge)Number⁠; 0Optional. Pixels. 0 or less goes to the window edge.
heightArea height (px, 0 = to the window edge)Number⁠; 0Optional. Pixels. 0 or less goes to the window edge.
filePathFile path to save imageString⁠; ""Required. Destination.
isOverwriteFileOverwrite FileBoolean⁠; falseOptional. Overwrite.

Outputs

OutputTypeMeaning and binding
fileAnyThe full path of the saved image. Bind to a File variable for later file or OCR steps.

Example

Open a test window titled Invoice Preview at least 200 by 150 pixels. Set Select window=Invoice Preview, Match the title=Exact, Area left=10, Area top=20, Area width=50, Area height=40, File path to save image=samples/shots/area.png, Overwrite File=false. Bind file to File variable areaImage.

Expected result

A 50 by 40 pixel PNG is saved and file holds its full path. If less of the window is there, the image is cut to the window. An area with nothing left inside the window, a missing window, a wrong extension or an existing file with Overwrite false fails.

Back to actions

Capture desktop (screenCaptureDesktop)

Saves the whole desktop, on all monitors.

Inputs

InputEditor fieldType and runtime defaultUse
filePathFile path to save imageString⁠; ""Required. Destination.
isOverwriteFileOverwrite FileBoolean⁠; falseOptional. Overwrite.

Outputs

OutputTypeMeaning and binding
fileAnyThe full path of the saved image. Bind to a File variable for later file or OCR steps.

Example

Set File path to save image=samples/shots/desktop.png, Overwrite File=false. Bind file to File variable desktopImage.

Expected result

The image covers all monitors. Gaps between monitors show as empty areas. file is its full path. An existing file needs Overwrite true.

Back to actions

Capture window (screenCaptureWindow)

Saves the whole window, with its frame.

Inputs

InputEditor fieldType and runtime defaultUse
windowTitleWindow titleString⁠; ""Optional. Window.
windowMatchMatch the titleTitleMatch⁠; ContainsOptional. Title matching.
filePathFile path to save imageString⁠; ""Required. Destination.
isOverwriteFileOverwrite FileBoolean⁠; falseOptional. Overwrite.

Outputs

OutputTypeMeaning and binding
fileAnyThe full path of the saved image. Bind to a File variable for later file or OCR steps.

Example

Open the test window Invoice Preview. Set Window title=Invoice Preview, Match the title=Exact, File path to save image=samples/shots/window.jpg, Overwrite File=false. Bind file to File variable windowImage.

Expected result

A JPEG of the window is saved, and file holds its full path. A missing window or a window with no size fails. A window in front also shows in the image.

Back to actions