VOGONS


First post, by ehdium

User metadata
Rank Newbie
Rank
Newbie

Hello,

I'd like to send keystrokes into a dosbox window.

I'm using AutoIt3 to run a script like this:

ControlSend("DOSBox 0.74,","",0x00080210,"W")

with no success. So I ask: have you had success in sending keystrokes to a DOSBox window? If so, how?

Thanks.

Reply 1 of 2, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Something like that should work, not sure if what you did does, though. You could look for emendelson's (search the users posts here) copy/paste thing for Windows. I think he uses autoit as well.
At first glance I'd say though that it should reference dosbox.exe rather than "Dosbox 0.74"

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 2 of 2, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
ehdium wrote:

I'm using AutoIt3 to run a script like this:

ControlSend("DOSBox 0.74,","",0x00080210,"W")

with no success. So I ask: have you had success in sending keystrokes to a DOSBox window? If so, how?

Just use Send, not ControlSend. Something like this works well:

If WinActive("DOSBox") Then
Send("{TAB}")
EndIf

You'll need to use WinActivate("DOSBox") before running that code.