DOS Program Automation
May 31, 2005 4:40 PM   Subscribe

Does anyone know of a program (preferably free and/or open source) for automating DOS applications? I have a DOS app that I can run under Windows and I just need to send it a sequence of keypresses.
posted by turbodog to Computers & Internet (11 answers total)
 
Is this a command-line based DOS application, or does it have a rudimentary GUI? (even so, a lot of them have command-line options available).

If either is the case, a simple batch file might be all you need.
posted by purephase at 4:51 PM on May 31, 2005


I'm pretty sure that Expect for Windows ought to do it.
posted by cmonkey at 5:18 PM on May 31, 2005


Workspace Macro might do the trick, but it's only free during the trial period, then you have to pay a small amount.
posted by gd779 at 7:14 PM on May 31, 2005


Second the batch file suggestion. You can do most anything you need with simple batch files, and I can virtually guarantee your DOS app will let you pass parameters to it on the command line.
posted by killdevil at 7:17 PM on May 31, 2005


You can pipeline actions in batch files.

For example:

ECHO Y | DEL *.* > NUL

will delete all files in a directory, then click "y" when asked to confirm.
posted by Civil_Disobedient at 8:27 PM on May 31, 2005


I think you can do it using Windows Scripting Host, which is part of XP (and I think older Windows as well). using wsh.appactivate (gives focus to a window), and wsh.sendkeys (supplies keyboard input). See this, and the examples it gives.
posted by Boobus Tuber at 8:47 PM on May 31, 2005


Batch files are probably what you're after, but failing that, AutoIt is free and has greatly eased my life in the past.
posted by squidlarkin at 8:56 PM on May 31, 2005


Wowsers. This is working some brain cells that have been dormant for a long time.

Fake.com was a simple program that would take a series of keystrokes as arguments, like this, IIRC:

C:\ > fake "F1,a,b,q" yourprog

And run the program, sending it those keystrokes. I used it extensively on my old Atari Portfolio.

/don't recall what a DOS prompt looks like.
posted by unixrat at 9:58 PM on May 31, 2005


Right, sorry. So batch a bunch of fake.com lines together and you can control the world! HAHAHAHA!
posted by unixrat at 9:58 PM on May 31, 2005




Response by poster: Thanks for the answers so far! I have a lot to investigate now.

The app in question, Q&A 4.0, does have a GUI, but I bet that fake will do the trick.
posted by turbodog at 8:22 AM on June 1, 2005


« Older Simple LCD Video Monitor?   |   Why won't my iRiver show up on the desktop? Newer »
This thread is closed to new comments.