batch1
:batch1
@echo off
title batch1
start batch2.bat
for %%a in (在不 好像没人 Exit) do (
ping -n 2 127.1>nul
at %time:~0,-3% ImBatch1 %%a >nul 2>nul
)
batch2
@echo off
(title batch2)&(mode con cols=20 lines=10)
:batch2
ping -n 1 127.1>nul
for /f "tokens=1,5*" %%a in ('at ^|find " ImBatch1 "') do (set "n=%%a" &set "info=%%b")
if /i "%info%"=="exit" (at %n% /del &exit)
::如果%n%非空,说明找到了ImBatch1发来的信息.
if not "%n%"=="" (
echo,%info%
at %n% /del
set "info="
set "n="
)
goto :batch2
Last edited by 523066680 on 2009-1-1 at 11:09 ]