Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-29-2020, 04:37 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,031
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, 108 views)
Attached Files
File Type: txt PassThroughPrintingToFile.py.txt (10.9 KB, 135 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 04:42 PM.
Closed Thread

Tags
auto print , example script , pass through printing , print to file , printing , python , securecrt


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:14 PM.