emendelson Posted June 26 Posted June 26 I'm trying to setup a way to print/create-PDF easily from old 16-bit applications that send output to LPT1, LPT2, or LPT3. I know there are commercial programs that capture LPT# output, but I would prefer to write something in AutoIt to do this. Can it be done? (I looked at TCPlisten, but I don't think it's even remotely relevant.)
argumentum Posted June 26 Posted June 26 what OS are you running the 16bit program in ? I once had to do something like that and bought a "parallel 2 NIC" hardware, that in turn, I would then receive via TCP in AutoIt, and turn those Epson escape chars into a PDF. ..many moons ago. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting
Nine Posted June 26 Posted June 26 I don't know if that would help, but there is a way to redirect lpt1 to file. Once printed in a file, you can read it from AutoIt and do whatever... You would need to create a dummy local printer in Windows that forces all print jobs into a physical file on your disk. - Go to Settings > Devices > Printers & Scanners (or Control Panel > Devices and Printers). - Click Add a printer or scanner. Wait for the scan to fail, and click The printer that I want isn't listed. - Select Add a local printer or network printer with manual settings and click Next. - From the "Use an existing port" dropdown, select FILE: (Print to File). - Choose a generic driver (like Generic/Text Only) and name the printer (e.g., "Virtual_LPT"). - Next, share this printer if required. - Use the net use command to redirect LPT1 to this newly shared virtual printer: net use lpt1: \\localhost\Virtual_LPT /persistent:yes When you print to LPT1, Windows will prompt you to select a file path and name to save the output. (untested) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Somerset Posted June 26 Posted June 26 Is the OP asking for printer output (actual printer) or for file output (file transfer)?
emendelson Posted June 27 Author Posted June 27 Actually, I wasted everyone's time with this question. The 16-bit apps I was asking about only run in emulators or emulator-like software such as cracyc's msdos-player. There's no way to capture LPT1 output from these apps outside of the emulator environment. What they can do is send LPT output to a file, and a folder-watcher can process that. So: thank you to the two forum members who asked for more information, and apologies for wasting your time with the question in the first place. argumentum 1
ioa747 Posted June 27 Posted June 27 https://www.bttr-software.de/freesoft/print.htm argumentum 1 I know that I know nothing
emendelson Posted June 27 Author Posted June 27 Excellent! A lot to experiment with. Thank you! ioa747 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now