Jump to content
Sign in to follow this  
Guest scottfenical

Sending Key Strokes To Dos Graphic-type Executable

Recommended Posts

Guest scottfenical

I need to send key strokes to automatically navigate a DOS executable. The problem is that the executable is a graphics-based (menu-based) executable that does not accept standard input. I know this because I tried echoing the inputs to a tempfile, which works for my other DOS executables, but not this one.

I wrote this script with AutoIt, but it didn't enter the commands into the DOS program (it just sits and waits for input).

Run("NMLONG.exe")

Send("s")

Send("m")

Send("c")

Send("s")

Send("n")

Send("x")

Send("y")

Please help!

Thanks,

Scott

Share this post


Link to post
Share on other sites
Valik

AutoIt runs balls out, it may be finishing before your program even starts. You should probably insert a sleep between the Run command and the send commands. Also, does the program change the title of the DOS window? If so, you may put in checks to make sure that window is active before sending keystrokes. If it doesn't, you may consider a batch file or something that will launch your program in a DOS window and rename the title of that window to something you can use in AutoIt.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.