SetPrt - set the session printer

Return to Introduction  Previous page  Next page

SetPrt({"printer"|"Application Default"|"RESTORE"}[,{P|L}][,Tray(tray_name)]

Where:

printeris the name of the printer.
Application Defaultspecifies application default printer. (Host, Print Setup...).
RESTORErestore the original session printer setting.
Psets the printer orientation to Portrait. Portrait is the default.
Lsets the printer orientation to Landscape.
tray_nameis the name of the paper source as found in the "Host,Print Setup..." dialog. The tray name must be enclosed in double quotes if it contains spaces.

 

The SetPrt command changes the session printer.

Examples

 

SetPrt("HP Printer 1",L,Tray("Tray 2"))

SetPrt("Application Default",P)

SetPrt("RESTORE")

 

Sample Script

The following script sets the printer to "HP Printer 1" with landscape orientation, prints the terminal screen and restores the session back to its default printer.

' This script sets the printer to "HP Printer 1" with landscape orientation,

' prints the terminal screen and restores the session back to its default printer.

'

SetPrt("HP Printer 1",L)

key(HostPrintScreen)

SetPrt("RESTORE")

exit

 

See Also:

 

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.