@echo off
@echo off
REM https://www.nirsoft.net/utils/nircmd.html
start "" "D:\rszt\Reeiss\bin\Reeiss.exe"
REM 打开 Reeiss.exe
REM 等待程序启动
timeout /t 3 >nul
REM 移动窗口到 (0, 0)
tasklist /fi "imagename eq Reeiss.exe" | find ":" >nul && (
for /f "tokens=2 delims=," %%a in ('tasklist /nh /fo csv /fi "imagename eq Reeiss.exe"') do (
set pid=%%~a
)
for /f "tokens=1-4 skip=1" %%a in ('tasklist /fi "pid eq %pid%" /fo list') do (
if "%%a"=="Window Title:" (
set title=%%b
)
)
nircmd win move title "%title%" 0 0
)
REM 等待3秒
timeout /t 3 >nul
REM 移动鼠标至 (100, 100) 并点击
tasklist /fi "imagename eq Reeiss.exe" | find ":" >nul && (
for /f "tokens=2 delims=," %%a in ('tasklist /nh /fo csv /fi "imagename eq Reeiss.exe"') do (
set pid=%%~a
)
for /f "tokens=1-4 skip=1" %%a in ('tasklist /fi "pid eq %pid%" /fo list') do (
if "%%a"=="Window Title:" (
set title=%%b
)
)
nircmd win activate title "%title%"
nircmd.exe movecursor 100 100
nircmd.exe sendmouse left click
)