WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DOS

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W12903
Filename:   SendKey to DOS simple script.txt
File Created: 1999:10:05:13:28:28
Last Updated: 1999:10:05:13:28:28