如何使应用程序发送的输入字符的批处理文件 [英] How to make a batch file that send application an input char
本文介绍了如何使应用程序发送的输入字符的批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在写启动应用程序的批处理文件。
APP.EXE
启动应用程序
之后,我得到的控制台选项列表,程序等待输入,例如:
A:启动会话乙:结束会话C:结束
块引用>如何让我的间歇式
A
?解决方案除了使用
回声
作为@npclaudiu建议,你也可以把预期输入到一个文本文件然后让应用程序读取文件:APP.EXE< input.txt中
这工作,如果应用预计投入超过一行。
I'm writing a batch file that launch an application.
app.exe
After the application is launched, I'm getting a list of options in the console, and the program waits for input, for example:
a: start session b: end session c: end
How do I make the batch type
a
?解决方案Other than using
echo
as @npclaudiu suggested, you could also write the expected input to a text file and then have the app read the file:app.exe <input.txt
This works if the app expects more than one line of input.
这篇关于如何使应用程序发送的输入字符的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文