Creating a simple batch simulating hitting enter key

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jackhandy
Posts: 1
Joined: 24 Dec 2014 11:43

Creating a simple batch simulating hitting enter key

#1 Post by jackhandy » 24 Dec 2014 11:48

I am trying to write a simple batch program to automate me hitting the enter key. There is a program I am running that requires me to start 1 batch program that doesn't require any user input. Then I start another batch program that requires me to hit the enter key once. Then I start another batch program that requires me to hit the enter key twice. Is there a way to write 1 batch program to automate this? Thank you.

npocmaka_
Posts: 482
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

Re: Creating a simple batch simulating hitting enter key

#2 Post by npocmaka_ » 24 Dec 2014 12:34

try to call the program that requires enter like that:

Code: Select all

break|call requires_enter.bat

Liviu
Expert
Posts: 470
Joined: 13 Jan 2012 21:24

Re: Creating a simple batch simulating hitting enter key

#3 Post by Liviu » 24 Dec 2014 14:41

Or...

Code: Select all

<nul call other.bat
...which runs the secondary batch in the same cmd session so, for example, it can pass environment variables back to the caller.

Liviu

Post Reply