The ScreenTrace() action controls screen tracing.
With no parameters, ScreenTrace() displays the current state of screen screen tracing.
Otherwise, it accepts the following parameters:
- Turns on screen tracing.
- Turns off screen tracing. This must be the only parameter.
- Directs screen traces to a file.
- Directs screen traces to the printer.
- With file, sets the tracing mode to plain text.
- With file, sets the tracing mode to HTML.
- With file, sets the tracing mode to Rich Text.
- With printer on Windows, ensures that a printer selection dialog appears, even on emulators like s3270 where it is normally suppressed.
- With printer on Windows, prevents a printer selection dialog from appearing, even on emulators like wc3270 where it is normally would appear.
- Display feedback as a pop-up instead of a return value from the action.
- 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.
- 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.
- 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.
Display the current state of screen tracing.
Turn on screen tracing with default options.
Turn off screen tracing.
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.
Turn on screen tracing to a specific Windows printer, without a printer selection dialog.
ScreenTrace(printer,nodialog,"Microsoft Print to PDF")