Save Windows 3.1 clipboard to text file?

Having problems with a specific game or application? Post your problems here!

Save Windows 3.1 clipboard to text file?

Postby emendelson » 2017-12-30 @ 23:10

This almost certainly isn't game-related, but I hope it's OK to ask it here.

I followed Dominus's excellent Windows 3.1 installation guide to set up a Win 3.1 system running under DOSBox on a Windows host. Using various projects I developed in the past, I can print from Win 3.1 apps to the default Windows printer, and copy text from the host clipboard into Win 3.1 apps.

What I can't do is copy text from the Windows 3.1 clipboard to the host, and I wonder if anyone knows of a Windows 3.1 utility that copies the contents of the Win31 clipboard to a text file (not a .CLP file). Ideally, I'd like to be able to set it up so that a keyboard shortcut runs that program and copies the Win31 clipboard to a file so that I can read that file and copy the contents to the host clipboard.

Does anything like this exist for Win31? There are lots of utilities that do this under 32-bit Windows, but I can't find any for 16-bit Wndows. (Shameless plug: the Win32 utilities include one that I wrote myself: http://www.columbia.edu/~em36/clip2txt.html.)

EDIT: My guess is that this would be possible by writing a WinBatch script, but I can't find a copy of the 16-bit version to experiment with. But I'm still hoping for something that already exists.
emendelson
Oldbie
 
Posts: 700
Joined: 2010-2-14 @ 02:00

Re: Save Windows 3.1 clipboard to text file?

Postby emendelson » 2017-12-31 @ 13:28

To answer my own question: the 16-bit version of Peter Lerup's terrific PrintFile does the job, but you need to study the command-line documentation to figure out how to do it (basically, set it up to "print" the clipboard contents to a generic text printer, which is set up to print to a filename):

http://www.lerup.com/printfile/
emendelson
Oldbie
 
Posts: 700
Joined: 2010-2-14 @ 02:00


Return to DOSBox Games/Apps

Who is online

Users browsing this forum: No registered users and 2 guests