Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File Question

Status
Not open for further replies.
Jul 10, 2002
32
US
This may sound a bit simplistic, but does anyone know a simple way to issue a keystroke from within a batch file in NT 4.0?

I am attempting automate a process, but one of the executeables I am running in the batch requires user intervention (a Y/N to the are you sure question). I need a way to script the Yes response.

Any ideas?
 
Hi,
if the Keystroke is needed on the command prompt than you can start the programm with &quot;echo Y| <Program>&quot; or you can use a programm that sends keystrokes like KPush from Horst Schaeffer ( ). If you need to automate a GUI than you can use a little VBScript to send the keys.
 
Boy, that was way to obvious. I guess I was looking a little too big picture.

I haven't had to pull out my old batch file hat for a long time, but I still should have known that.

The first worked like a charm. Thanks for the old school reality check.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top