Jump to content

A Way of COPY and PASTE for DosBox(AutoIt wrapper)


Recommended Posts

I posted this over at the DoxBox forum. Since I got a lot of help form reading the forum I figured I share it here also. To test it you need to version DOSBox 0.70 that you can download off their site:dosbox.sourceforge.net

I use dosbox for older serial based PLC programs. I missed the copy and paste function of the older win98 dos windows. So I came up with this AutoIt wrapper that has mouse selections, icons, and copy paste hotkeys. This solution does not modify DosBox code in anyway it is just creates a wrapper around the window.

I'll provide a little information how it works. First it must run a TSR program called xpcmouse.exe in dosbox. This provides the selectable text inside the DosBox. When the user selects text in DosBox and press the Copy Icon or Ctrl+c it will write to a file that is on mapped drive. Then AutoIt reads the file and places the copied information into the Windows Clipboard. When the user paste using Ctrl+v or the Paste icon it will send keys to the dos window with whatever is in the windows Clipboard. Also I provided an Icon to hide the status window. This code should work in any version but the windows titles will have to be changed in clip.ini. Right now it is fixed for DOSBox 0.70. To upgrade in the future just change to the newer names.

To install just unzip to your current DosBox directory into a subdirectory called clip. Run clip.exe. I also included the clip.au3 if any one is curious about the code.

I worked hard on this so if it is helpful for anyone please leave me feedback I'm willing to see what you think. I just want to thank Qbix for a great program without it my older programs would never work in XP. DosBox and AutoIt are the best two programs on the Internet.

clip.zip

Link to comment
Share on other sites

  • 7 years later...
Hi Seeker,
 
I'm totally new to dosbox and autoit :) I tried your clip.zip and it works very good. Now I can copy paste to dos(dosbox) :)
Thanks!
 
I had problems with numlock - numerical part of keyboard did'nt work (light was on). Solution was to twice press numlock key.
I tried with:
send("{NUMLOCK on}")
DllCall("user32.dll","long","GetKeyState","int",$VK_NUMLOCK)
x times and it didn't work in my dosbox.
 
I have created num_off.com and num_on.com which works. I call this two files in .conf (num_off and next line num_on)
 
Source:
numlock off
numlock on:
 
 
Regards,
T.
 
P.S.

Since I'm new in this forum, I don't see attachment button yet. I should wait 24h and post 5 or more posts :( ?

COM files are small. I attache them in zip file encoded with base64 as text:

-------copy----paste-intofile num.b64---

MIME-Version: 1.0
Content-Type: application/octet-stream; name="num.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="num.zip"
 
UEsDBBQAAgAIABVxeUWKFj4xFQAAABMAAAAKAAAATlVNX09OLkNPTdvhwNB3o4FPnEFhC+NZsR0M
PmcVAVBLAwQUAAIACADBcHlFNzZbDhEAAAAPAAAACwAAAE5VTV9PRkYuQ09N2+HA0HejQU2c4f4O
Bp+zigBQSwECFAAUAAIACAAVcXlFihY+MRUAAAATAAAACgAAAAAAAAAAACAAAAAAAAAATlVNX09O
LkNPTVBLAQIUABQAAgAIAMFweUU3NlsOEQAAAA8AAAALAAAAAAAAAAAAIAAAAD0AAABOVU1fT0ZG
LkNPTVBLBQYAAAAAAgACAHEAAAB3AAAAAAA=
-----to here

 

I posted this over at the DoxBox forum. Since I got a lot of help form reading the forum I figured I share it here also. To test it you need to version DOSBox 0.70 that you can download off their site:dosbox.sourceforge.net

I use dosbox for older serial based PLC programs. I missed the copy and paste function of the older win98 dos windows. So I came up with this AutoIt wrapper that has mouse selections, icons, and copy paste hotkeys. This solution does not modify DosBox code in anyway it is just creates a wrapper around the window.

I'll provide a little information how it works. First it must run a TSR program called xpcmouse.exe in dosbox. This provides the selectable text inside the DosBox. When the user selects text in DosBox and press the Copy Icon or Ctrl+c it will write to a file that is on mapped drive. Then AutoIt reads the file and places the copied information into the Windows Clipboard. When the user paste using Ctrl+v or the Paste icon it will send keys to the dos window with whatever is in the windows Clipboard. Also I provided an Icon to hide the status window. This code should work in any version but the windows titles will have to be changed in clip.ini. Right now it is fixed for DOSBox 0.70. To upgrade in the future just change to the newer names.

To install just unzip to your current DosBox directory into a subdirectory called clip. Run clip.exe. I also included the clip.au3 if any one is curious about the code.

I worked hard on this so if it is helpful for anyone please leave me feedback I'm willing to see what you think. I just want to thank Qbix for a great program without it my older programs would never work in XP. DosBox and AutoIt are the best two programs on the Internet.

Link to comment
Share on other sites

  • 2 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...