我有多個批處理文件我運行監視我的網絡鏈接。我有下面的代碼集之一。我運行一個批處理文件來一次打開所有文件。然後,我必須在屏幕頂部重新定位它們,以便我可以打開Internet Explorer以在屏幕底部顯示太陽風。我想添加我使用的代碼來設置每個窗口的打開位置。預先感謝您的幫助。大小批處理窗口和設置在特定位置
@echo off
TITLE = VoIP Link
mode 50,20
setlocal enableextensions enabledelayedexpansion
rem Get address from command line
set "address=13.2.9.6"
if not defined address set "address=127.0.0.1"
rem Configure levels and colors
rem The format is initialValue:color in value descending format
set "levels=9000:4F 178:E0 146:2F 0:E0"
rem infinite loop
for /l %%i in() do (
rem retrieve information from ping command
set "rtt=Timed Out"
set "ttl=?"
for /f "tokens=3,4 delims==^<" %%a in (
'ping -n 1 "%address%" ^| find "TTL="'
) do for /f "tokens=1 delims=m" %%c in ("%%a") do (
set /a "rtt=%%c"
set "ttl=%%b"
)
rem retrieve color
set "color="
for %%z in (%levels%) do for /f "tokens=1,2 delims=:" %%a in ("%%z") do (
if not defined color if !rtt! geq %%a set "color=%%b"
)
rem show information
if defined color color !color!
echo(!time! - %address% - rtt[!rtt!]
rem save to log
for /f "tokens=1-4 delims=.:-/ " %%a in ("!date!") do (
>> "%%b-%%c-%%d_%%a_VOIP Link 1.txt" echo(!date! - !time! - %address% - rtt[!rtt!]
)
rem wait and repeat the process
ping -n 3 localhost >nul 2>nul
)
也許[這](http://stackoverflow.com/a/24905911/2861476)可以幫助 – 2014-12-02 11:46:27
或此http://www.commandline.co.uk/cmdow/ – 2014-12-02 11:48:25