tags:

views:

153

answers:

2

I need to wrap an interactive DOS application with GUI. The DOS application does not accept any command line parameters. As such, all works have to be done interactively.

The process to get a job done is as follow: 1. Start the DOS application in DOS command prompt. 2. A screen appears and we are asked to "Press any key to start" 3. Pressing any key leads to "Menu 1" where we are presented with choices: [C] .. Create new file [L] .. Load existing file [Q] .. Quite Program 4. Press 'L' will lead to another screen, that shows the default drive to load the project file. If the drive is not the desired one, "Press [SPACE BAR] to change Drive" 5. Press "return" to confirm the drive 6. All relevant project files will be displayed, we can then use up-down-left-right arrows to navigate and press enter to load the file. 7. And the interactive process goes on, until a textual output is generated.

I don't have the source code of the DOS application.

Is there any tool available that allow me to drive the whole process through a definition file. Such tool will allow me to develop a GUI to complete the job without needing the user to interact with the old DOS application.

Thanks. David

+1  A: 

What may be your easiest option is to use Quick Test Pro to do your automation. If you don't care what is displayed on the screen, you could use the SendKeys function to enter the key presses. You can use SendKeys from about any Microsoft language/environment.

brianegge
+1  A: 

You could probably do this using Windows Script Host and the SendKeys method. Here's a VBScript example from MSDN:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "calc"
WScript.Sleep 100
WshShell.AppActivate "Calculator"
WScript.Sleep 100
WshShell.SendKeys "1{+}"
WScript.Sleep 500
WshShell.SendKeys "2"
WScript.Sleep 500
WshShell.SendKeys "~"
WScript.Sleep 500
WshShell.SendKeys "*3"
WScript.Sleep 500
WshShell.SendKeys "~"
WScript.Sleep 2500
Helen