批量发送"ENTER"运行程序的关键 [英] batch send "ENTER" key to running program

查看:137
本文介绍了批量发送"ENTER"运行程序的关键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧" fortran.exe文件(无法访问代码),我需要使用批处理文件执行数百次.

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.

但是,在fortran程序的末尾,它会打印"Press ENTER to exit",当然会中断批处理文件的执行...

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

是否可以将{ENTER}发送到正在运行的程序?

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

推荐答案

检查 sendkeys.bat .该脚本能够将具有特定标题的键发送给正在运行的程序:

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

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

编辑

尝试使用此脚本

call nonsecureSendKeys.bat "progfortr" "{ENTER}"

这篇关于批量发送"ENTER"运行程序的关键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆