【发布时间】:2021-09-30 23:51:17
【问题描述】:
如何批量检查资源管理器窗口是否打开?
我需要在已选择文件的情况下截取目录的屏幕截图,但必须在窗口打开之后。窗口标题始终相同。
例子:
REM Opening folder with a file selected
START /W EXPLORER /SELECT,\\10.10.10.10\C$\ThisFolder\FileToHighlight.txt
REM Unreliably waiting for window to open
TIMEOUT /T 3 /NOBREAK >NUL
REM Taking screenshot of window with a third-party app
START .\Bin\screenshot-cmd.exe -wt "ThisFolder" -o .\Screenshots\%var%.png
【问题讨论】:
-
看看
start /waitss64.com/nt/start.html -
看起来它一直等到应用程序终止?这对我没有好处,因为我只有在截屏后才关闭窗口
-
你能发布你的代码吗?
标签: batch-file window wait explorer