VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

In response to popular demand (actually a request by one or two people at most), here is a Windows utility program (built with AutoIt) that pastes the contents of the Windows clipboard into DOSBox.

Run it from anywhere in Windows. Do not try to install it in DOSBox. It is a Windows application, not a DOS application.

It works only with ASCII characters; not with characters that can only be typed into DOSBox by holding down the Alt key and pressing other keys. [EDIT: the current version works with upper-ASCII characters also.]

It requires that your DOSBox window be titled either with a string that begins "DOSBox 0." (for example, "DOSBox 0.74" or with "DOSBox SVN".

Your DOSBox executable must be named DOSBox.exe (not MyCopyOfDOSBox.exe or any other name).

If DOSBox is not running, the utility exits and does nothing. If DOSBox is running, the utility tries to paste the Windows clipboard into DOSBox, and then the utility exits.

If anyone is interested, I can easily create a version that stays running in the taskbar tray, and lets you press the Pause key to paste the Windows clipboard into DOSBox. [EDIT: Done; see next post.] But the version posted here simply runs, pastes the clipboard, and exits.

Comments welcome.

https://www.dropbox.com/s/hxqoblg6ozmbmn3/Pas … DOSBox.exe?dl=1

Last edited by emendelson on 2017-02-28, 18:06. Edited 6 times in total.

Reply 1 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

And here's a version that runs in the background (exit it by right-clicking its icon in the system tray). If DOSBox is the foreground application, then press the Pause key to paste the contents of the Windows clipboard into DOSBox. If DOSBox is not the foreground application, or not running, the Pause key will do nothing. This should work when DOSBox is running full-screen or in a window.

https://www.dropbox.com/s/6iq2wm6pr6yqhx6/Bac … DOSBox.exe?dl=1

EDIT: updated URL

Last edited by emendelson on 2017-02-28, 18:06. Edited 2 times in total.

Reply 3 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Thanks to the very helpful people over at the AutoIt forums, I've updated both these utilities so that they now work with upper ASCII (accented etc.) characters in addition to ordinary ASCII characters.

Last edited by emendelson on 2013-02-05, 22:31. Edited 1 time in total.

Reply 4 of 16, by coolhaken

User metadata
Rank Newbie
Rank
Newbie

This is a useful program for me. Thanks.
But there is a problem. It losts characters ...

Attachments

  • Filename
    1.png
    File size
    7.45 KiB
    Downloads
    289 downloads
    File comment
    Some characters lost
    File license
    Fair use/fair dealing exception

Reply 5 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
coolhaken wrote:

This is a useful program for me. Thanks.
But there is a problem. It loses characters ...

Try pressing Ctrl-F12 to speed up DOSBox and see if that helps. Also, tell me which of the two utilities you are using (background or non-background version), and I will post a version with a slight delay between each emulated keystroke. That may solve the problem.

Reply 6 of 16, by coolhaken

User metadata
Rank Newbie
Rank
Newbie

I cancel the "mode con: ....." command and try background and non-background version.
Now they lost the last character. Two versions have the same problem.
Speed up DOSBox doesn't help.

Attachments

  • 2.png
    Filename
    2.png
    File size
    6.89 KiB
    Views
    8273 views
    File license
    Fair use/fair dealing exception

Reply 7 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Maybe try with just the default dosbox.conf and then slowly change things like machine to learn what makes the characters lost

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I figured out that when I fixed my code to accommodate upper-ASCII characters, it started dropping the last character of the clipboard. The current versions fix that problem, and introduce slight delays that may prevent other characters being dropped. Please let me know if this fixes the problem.

Reply 9 of 16, by coolhaken

User metadata
Rank Newbie
Rank
Newbie

The newest version solves the problem of lost last character.
Even if I use the "mode con: ..." command.

Then I try to run "MS-DOS Editor" and paste a string.
It lost characters if there are more than about 180 characters in the string.

3_189.png

Attachments

  • Filename
    3.png
    File size
    5.27 KiB
    Downloads
    249 downloads
    File comment
    lost characters .....
    File license
    Fair use/fair dealing exception

Reply 10 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Yes, I found a lot of problems pasting into the MS-DOS Editor in DOSBox; it isn't the real MS-DOS Editor, but a FreeDOS version, and I don't think the FreeDOS authors have finished working on it.

You might try a different editor instead; I've used other editors that don't have this problem. There is a list of some of them here:

http://texteditors.org/cgi-bin/wiki.pl?MsDosEditors

I like TED (or one of the more recent varieties of it), but others may be more useful. For example, you might want to download the Windows 95 version of EDIT.COM, which works very well, and which you can find with a little bit of web-searching. (I don't think I can post a link here because that would violate the policies of this board.)

You will certainly get better results with a different editor. This is a problem in the FreeDOS EDIT.COM, not in my utility.

Last edited by emendelson on 2013-02-05, 22:31. Edited 1 time in total.

Reply 11 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I made various fixes in these programs, including one that prevents some characters from being dropped, so please use the current versions instead of the ones posted earlier.

(However, please keep a backup of your existing version, because I think these new versions may sometimes drop the first character in the clipboard. Please let me know of any problems with these new versions.)

Reply 12 of 16, by atesin

User metadata
Rank Newbie
Rank
Newbie

hi

brilliant idea, i was looking for this long time ago

before, to mount a directory/iso i must share dosbox dir, create a BATCH file in windows, refresh disk cache in dosbox and launch bat

however until useful, this script apparently has some troubles, finally i'd made my own using AUTOHOTHEY based on the same idea that seems to works the same and ok, just press PAUSE key to paste clipboard (auto type) on dosbox window

if you have some troubles interpreting special chars like backslashes with your text editor just try another, for me the classic EDIT.COM shipped with windows 9x works flawlessly

since i use ykhwong's custom glide+net build my window title differs a little .. here is the source and below are the compiled binaries. i decided not to use mpress EXE compression to avoid antivirus alerts

; written by atesin (at gmail.com) 01-01-2013
;
; i use ykhwong glide+net build ( http://ykhwong.x-y.net )
; so in my case window name is "DOSBox SVN"...
; if you use an official build you may use "DOSBox 0."...

pause::
IfWinExist DOSBox SVN
WinActivate
send %clipboard%
return

if you compile your own i found nice this icon http://tfqa.com/graphics/dosboxicon.ico

Attachments

  • Filename
    dosbox-official-pause-paste.exe
    File size
    785.5 KiB
    Downloads
    251 downloads
    File comment
    for use with official releases
    File license
    Fair use/fair dealing exception
  • Filename
    dosbox-ykhwong-pause-paste.exe
    File size
    785.5 KiB
    Downloads
    247 downloads
    File comment
    for use with ykhwong release
    File license
    Fair use/fair dealing exception

Reply 13 of 16, by RetroComp

User metadata
Rank Newbie
Rank
Newbie

Hi emendelson,

emendelson wrote:

In response to poplar demand (actually a request by one or two people at most), here is a Windows utility program (built with AutoIt) that pastes the contents of the Windows clipboard into DOSBox.
Comments welcome.
https://dl.dropbox.com/u/271144/BackgroundPas … lipToDOSBox.exe

Thanks, your second tool (BackgroundPasteClipToDOSBox) is really useful and fun to use, too.
Can you share the .au3 font file with us?
(I´m trying to customize the paste key and improve the tool.)

Thanks again,
RetroComp.

Reply 14 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
RetroComp wrote:

Can you share the .au3 file with us?

Of course:

https://www.dropbox.com/s/rzo44gabji1zekd/Bac … AutoIt.zip?dl=1

Please post any improvements that you make to the code. I don't pretend to know anything about AutoIt scripting. My method is basically to throw code at random into the editor and hope that something works. Any improvements will be very good to have.

EDIT: updated URL

Last edited by emendelson on 2017-02-28, 18:07. Edited 1 time in total.

Reply 15 of 16, by marborg67

User metadata
Rank Newbie
Rank
Newbie

Hej. Thanks for a great utility. We live in Sweden and my husband used a
MS-dos based statistical program on his old W98 laptop. He used it many times a week, a lot of copying and pasting was involved. Last week his old laptop died (after 13 years) so we decided to find another solutions. After some problems we managed to get the program working in D-fend reloaded. After all ,the last time I used DOS was about 15 years ago and this program wants to start att C:. After some changes most of it worked until we discovered that the cut and paste-function was gone. Then I looked for a solution and found your backgroundpasteclip to dos. At first I didn't know how to use it. There are no instructions about where to install the program. I started with installing it in D-fend but that didn't work. After starting the program from the desktop it worked fine. We encountered the following problems:
First letter missing, Problems inserting long list of characters.
I read your solution to these problems but I just don't get it. I downloaded TED but D-fend doesn't find it. I have no clue how to make D-fend and Freedos use this editor instead. I changed the texteditor to Ted but that didn't work out. I searched the Internet for answers but no luck.

Can you please help me with this problem?

Thanks again.

Marianne

Reply 16 of 16, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Hello Marianne,

As the developers will tell you, DOSBox is designed for games, not applications, so there may be no solution to these problems. You might want to consider other ways to run DOS applications under 64-bit Windows, as described here:

http://www.columbia.edu/~em36/wpdos/64bitwindows.html

Probably the simplest (though not the best) answer is: put TED.COM in the same directory with the statistical program. To run TED.COM, exit the statistical program and type TED or C:\whateverDirectoryTheStatisticalProgramIsIn\ted.com

I have sent you a private message with a possible solution to the problem with characters not being typed into the statistical program. It is possible that this program cannot be solved because the statistical program may not be fully compatible with DOSBox.