Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

batch send "ENTER" key to running program

Tags:

I have an "old-good" fortran.exe file (without access to the code) and I need to execute a few hundred times using a batch file.

However, at the end of the fortran program, it prints "Press ENTER to exit", interrupting, of course, the execution of the batch file...

Is there a way to send the {ENTER} to the running program?

like image 601
João Palma Avatar asked Apr 07 '16 15:04

João Palma


1 Answers

check the sendkeys.bat. The script is capable to send a keys to running program with particular title:

call sendkeys.bat "fortran-program" "{ENTER}"

EDIT

try with this script

call nonsecureSendKeys.bat "progfortr" "{ENTER}"
like image 125
npocmaka Avatar answered Oct 03 '22 10:10

npocmaka