First post, by mastemah
Hello everyone,
I want to write a program that programatically uses the DOXBox environment to automize some games and/or programs running in DOSBox. The program should be able to execute commands in the emulator, send keyboard commands to DOSBox, etc.
I intend to do this using Python 3 and pywin32. I played around a little and already noticed that sending keyboard input is not necessarily straight forward (for some reason, the key bindings are somewhat mixed up... sending a slash will result in sending a v character for example)... but there is a way around that, by remapping the keys in Python.
However, I haven't found a way yet to read output out of DOSBox. So, let's assume that I get an error message in DOSBox, and I would like to be able to read it in Python to analyze later. Is there any interface or way to do that?
I checked the documentation and tried a search on the forums without finding something that could point me in the right direction. Does anybody have a clue how to able to do that?
Although I don't think this is relevant in this case, here are my specs according to the guidelines:
Motherboard: Acer Aspire V notebook
Processor type and speed: i5 6267U
Amount and type of RAM- 8GB DDR3
Video board w/ RAM amount and type: Intel Iris Graphics 550
Sound board: onboard
Operating system: Windows 10
Game name (and version, if applicable): Only working on DOS currently, no game loaded yet.
Description of problem (be detailed: saying "it's jerky" doesn't help, saying "the player sprites seem to be jerky when I'm pressing any of the arrow keys" does): Cannot read out standard output (from command line) into Host system / Python.
Reproducibility of problem (always, only once, always but only on a specific level, etc.): Always
Sound mode used: not applicable
Video mode (Software, OpenGL, Direct3D, or Glide, and resolution): not applicable
Version of emulator (for VDMSound, probably 2.0.4 or 2.1.0; for DOSBox, 0.58+): 0.74
Steps already attempted to solve the problem (please say you've read the README if you haven't, and READ IT IF YOU HAVEN'T!): I can programtically start DOSBox from Python. I can also send keyboard input, although I have to remap the keys in Python to get the desired result.