脚本在桌面浴室文件的4个玉米器上运行4个ping窗口

时间:2016-08-19 11:29:05

标签: batch-file

如何在4台桌面玉米器上运行4个ping窗口?谁帮帮我?谢谢!

4 ping commands on 4 cornners of desktop

1 个答案:

答案 0 :(得分:1)

您可以使用可免费下载的{nircmd here在创建后移动窗口

start "ping1" ping -t 127.0.0.1
start "ping2" ping -t 127.0.0.1
start "ping3" ping -t 127.0.0.1
start "ping4" ping -t 127.0.0.1

set SCREEN_WIDTH=1280
set SCREEN_HEIGHT=980
set /A WIDTH=%SCREEN_WIDTH%/2
set /A HEIGHT=%SCREEN_HEIGHT%/2

rem wait to be sure the windows are open
timeout /T 1
rem arguments syntax: x y width height
nircmdc win setsize title ping1  0 0 %WIDTH% %HEIGHT%
nircmdc win setsize title ping2  %WIDTH% 0 %WIDTH% %HEIGHT%
nircmdc win setsize title ping3  0 %HEIGHT% %WIDTH% %HEIGHT%
nircmdc win setsize title ping4  %WIDTH% %HEIGHT% %WIDTH% %HEIGHT%

必须根据您的显示器尺寸进行配置,这是主要限制。