Rob van der Woude's Scripting Pages

Help text for PrintWindow.cs

(view help text of PrintWindow.cs as plain text)

PrintWindow.exe,  Version 1.01
Take a screenshot of the specified window

Usage:   PrintWindow.exe  title  outputfile  [ options ]

Where:   title         is the window title
         outputfile    is the file to contain the screenshot

Options: /C:"T,R,B,L"  Correct screenshot dimensions for Top, Right,
                       Bottom, Left in pixels, e.g. /C:"-1,1,1,-1" to
                       add 1 pixel at each side (note the minus sign)
         /D            Debug mode: show the screen coordinates used
         /O            Open the resulting output file (implied with /D)
         /X            window title and specified title must match eXactly
                       (default: window title contains specified title)

Credits: Get window position and size
         Screenshot based on code by Ali Hamdar (
         SystemMetric enumeration published by Gabriel T. Sharp on

Note:    Return code -1 in case of errors, otherwise 0.

Written by Rob van der Woude

page last uploaded: 2022-10-05