View Single Post
  #1  
Old 06-29-2020, 05:37 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,052
Post Example: Pass Through Printing to File

In cases where the remote legacy app running on your connected host provides for retrieving desired ASCII data only via pass through printing codes, this script example demonstrates one way of saving this data to a file instead of having to print to a physical printer.

Usage:
  • Either configure this script as the Logon script for your saved session (Session Options > Logon Actions, Logon script), or configure a button mapped to run this script (and click the button just before you issue the print command within the remote hosted application).
  • (optional) Supply a /noprompt script argument to more fully automate the process of printing the received data to a file.
Once the script is running, it will continue to run until the script is manually canceled (Script > Cancel) or until the connection to the remote host/device is terminated.

While running, the script will automatically intercept auto-print and pass-through printing sequences (currently VTxx and xterm emulations only) and write the received ASCII data to a file instead of sending the data to a printer.
Note: To facilitate this script's operational technique, pass through printing must be disabled in Session Options. The script will detect if this is not the case, and offer to change it for you.

Download the script code here.




--Jake
Attached Images
File Type: png SCRT_ExampleScript_PassThroughPrintToFile.png (28.4 KB, 192 views)
Attached Files
File Type: txt PassThroughPrintingToFile.py.txt (10.9 KB, 213 views)
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 06-29-2020 at 05:42 PM.