Scripting a Foxbase program running under windows command prompt
Posted on 2009-04-06
I have been tasked with automating a Foxbase program that has been in use in my company for some time. The program is used to combine output files from a capture taken from another script that runs on an emulated VAX host. The foxbase script I am looking to automate runs in an MS-DOS prompt under windows.
I have experimented with triggering and controlling this program with VB-Script. However, the best I can do is to trigger the program to execute in a separate DOS shell. I cannot use VB-Script to enter commands into the program's prompts. I am wondering if there is a way to do this easily with a scripting language or automation tool?
I have experimented with various automation tools such as HP QuickTestPro to no avail. QTP does not seem to recognise the foxbase application as another element that you can automatically control. It sees instead, another command prompt. That's it. It does not seem to recognise the commands being typed into the program.
When I use VB-Script to program cmd prompts, the text typed does not appear anywhere in either the foxbase program or the original cmd prompt until the Foxbase program has ended and the focus is back onto the original cmd prompt that spawned the process.
I realise that the only solution may well in fact be to re-write the foxbase application in another more user-friendly language. However, I'm not in possession of the source code and am not sure exactly what this program does in its entirety. I'm essentially looking for the simplest and quickest solution.
Any ideas would be very much appreciated.