SendKey to DOS simple script
Keywords: sendkey send key dos script run wbt
Example of Sending Keystrokes to DOS:
When sending keystrokes to applications, make sure you're using the "Run", rather than "Runwait" function.Run(Environment("COMSPEC"), "") TimeDelay(0.5) doswin=WinGetActive() message("",doswin) Sendkeysto(doswin, "DIR{ENTER}") TimeDelay(0.5) Sendkeysto(doswin, "exit{ENTER}")If you want to autoclose DOS windows, you need to set up a shortcut for command.com (or a copy of it that you run instead of command.com ) with settings set to "CLOSE WINDOW ON EXIT" and "RUN AS A NORMAL WINDOW". (The shortcut is really a PIF file - look at it in DOS.)
Article ID: W12903Filename: SendKey to DOS simple script.txt