press Esc ...

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Forseti
Posts: 3
Joined: 26 Mar 2013 17:05

press Esc ...

#1 Post by Forseti » 26 Mar 2013 17:09

Hi, I want an open DOS window, which I have called with. Cmd (meine.exe-I),
press the Esc command ... automatically terminate!

how would my my. cmd therefore look?

Sorry for my bad english!

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: press Esc ...

#2 Post by foxidrive » 26 Mar 2013 17:21

I don't quite understand: do you want to open a cmd window, and then make it close when escape is pressed?

What is the purpose? It will help us understand what you are trying to do.

Forseti
Posts: 3
Joined: 26 Mar 2013 17:05

Re: press Esc ...

#3 Post by Forseti » 26 Mar 2013 17:33

I try to run an application with CMD automatically!
For Close the open dos window ESC are pressed!

my cmd:

@echo Patch
@"Patch.exe" -I
@echo Done!

Image

how the command is to Close?

@echo Patch
@"Patch.exe" -I
@press Esc????
@echo Done!

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: press Esc ...

#4 Post by foxidrive » 26 Mar 2013 18:01

If patch.exe is waiting for an escape keystroke, then you could rig something like VBS and Sendkeys, but Autoit might be better than batch.

Forseti
Posts: 3
Joined: 26 Mar 2013 17:05

Re: press Esc ...

#5 Post by Forseti » 26 Mar 2013 18:07

AutoIT Script:

Run("Patch.exe -I")
Sleep (1000)
Send ("{Esc}")
Exit


works!However, you can write it better?

Post Reply