Jump to content

Sending Key Strokes To Dos Graphic-type Executable


Guest scottfenical
 Share

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

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...