PrintText() action

Overview
Captures a snapshot of the current screen contents and saves it to a file or to the printer.

Parameters

 * File
 * Directs the snapshot to a file instead of the printer.


 * String
 * Returns the snapshot as a string, instead of directing it to the printer.


 * Printer
 * Directs screen traces to the printer.


 * Html
 * With File or String, saves the snapshot as HTML.


 * Rtf
 * With File or String, saves the snapshot as Rich Text.


 * Dialog
 * On Windows, ensures that a printer selection dialog appears, even on emulators like s3270 where it is normally suppressed.


 * NoDialog
 * On Windows, prevents a printer selection dialog from appearing, even on emulators like wc3270 where it is normally would appear.


 * Replace
 * With File, causes the file to be replaced if it already exists.


 * Append
 * With File, causes the snapshot to be appended to the file if it already exists. This is the default behavior.


 * Modi
 * Displays modified fields in italic.


 * Secure
 * In x3270, suppresses the dialog that allows the print command to be edited.


 * Caption text
 * Specifies a caption for the snapshot. Within text,  is replaced with a timestamp.

As the last keyword, specifies that what follows is the command to run.
 * Command
 * filename
 * With File, the final parameter must be the name of the file to save to. If not otherwise specified, the snapshot type can be inferred from the suffix on the name.


 * print-command
 * On POSIX, the optional final parameter is the printing command. The screen snapshot will be fed as plain text to that command's standard input.


 * printer
 * On Windows, the optional final parameter specifies the name of the printer to use.

Examples
Turn on screen tracing to a text file with a default name. ScreenTrace(File) Turn on screen tracing to a specific HTML file. ScreenTrace(On,/tmp/trace.html) ScreenTrace(/tmp/trace.html) Turn on screen tracing in HTML, letting the emulator pick a default file name.] ScreenTrace(On,Html) ScreenTrace(Html) Turn on screen tracing to a specific Windows printer, without a printer selection dialog. ScreenTrace(Printer,NoDialog,"Microsoft Print to PDF") Turn on screen tracing to a specific POSIX printer. ScreenTrace(Printer,"lpr -Pmx860")