如何自动化“刷新cmd窗口”?

问题描述 投票:-1回答:1

我打电话使用其持久性有机污染物一个cmd窗口批处理文件的程序。我需要刷新它每隔30秒,我可以在cmd如何写R做手工。我想现在它自动化。

解决办法我期望:

  • 寻找这个节目在任务列表每30秒(完成)
  • 从任务列表调用/访问它,并写R(不知道如何实现)

代码(文件:run_myapp.bat):

set appName=MyApp.exe
call C:\Scripts\%appName% "0" "Blue"
wait 2000
::
:ReFresh
tasklist /FI "IMAGENAME eq appName" 2>NUL | find /I /N "appName">NUL
if "%ERRORLEVEL%"=="0" (
...
**rem I need some code here to access/invoke the app from tasklist and write R in it**
...
echo Last refreshed at %time%
wait 30000
goto :ReFresh
)
batch-file cmd tasklist
1个回答
0
投票

包括的CreateObject( “WScript.Shell”):shell.SendKeys

加{R}如按钮,然后做了一些循环再次期运用你的$刷新

© www.soinside.com 2019 - 2024. All rights reserved.