Jump to content

Recommended Posts

Posted

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.)

Posted

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)

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...