ScreenTrace() action
The ScreenTrace() action controls screen tracing.
Parameters
With no parameters, ScreenTrace() displays the current state of screen screen tracing.
Otherwise, it accepts the following parameters:
- on
- Turns on screen tracing.
- off
- Turns off screen tracing. This must be the only parameter.
- file
- Directs screen traces to a file.
- printer
- Directs screen traces to the printer.
- text
- With file, sets the tracing mode to plain text.
- html
- With file, sets the tracing mode to HTML.
- rtf
- With file, sets the tracing mode to Rich Text.
- dialog
- With printer on Windows, ensures that a printer selection dialog appears, even on emulators like s3270 where it is normally suppressed.
- nodialog
- With printer on Windows, prevents a printer selection dialog from appearing, even on emulators like wc3270 where it is normally would appear.
- info
- Display feedback as a pop-up instead of a return value from the action.
- filename
- With file, the optional final parameter is the name of the file to trace to. If not otherwise specified, the trace type can be inferred from the type suffix on the name.
- print-command
- With printer on POSIX, the optional final parameter is the printing command. The screen trace will be fed as plain text to that command's standard input.
- printer
- With printer on Windows, the optional final parameter specifies the name of the printer to use.
The on parameter can be used by itself to turn on screen tracing with default options.
The defaults for target, file type, file name and printer are controlled by resources listed under the screenTrace resource.
Examples
Display the current state of screen tracing.
ScreenTrace()
Turn on screen tracing with default options.
ScreenTrace(on)
Turn off screen tracing.
ScreenTrace(off)
The following examples assume that screen tracing defaults have not been overridden by resource definitions.
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")