当前位置: 首页 > 图文教程 > 脚本技术 > DOS/BAT > 三个不同文件停顿二秒弹出不同窗口的批处理

DOS/BAT
一个“灵异”批处理引发的思考加补充说明
批处理隐藏自身窗口,很无聊
批处理bat 延时执行命令的两种方法
执行批处理bat程序中的条件处理
不错的批处理脚本 第一部分
不错的批处理脚本实例代码 第二部分
开机更新桌面主题的批处理代码
非常好的for 教程, 当时我就是看这个学习for 的
批处理的"循环"效果脚本
批处理中常用的符号总结
关于echo 的问题与使用说明
进入dos的一个密码破解方法
VBS CHR码值对应列表
无法使用GHOST及避免出现A:\GHOSTERR.TXT的解决方法
用vbs实现cmd多命令运行功能代码
三个不同文件停顿二秒弹出不同窗口的批处理
写批处理必备的一些命令参数使用技巧
一个小助手批处理实例代码
网管常用的网络命令集合
批处理的api WMIC学习体会有感

DOS/BAT 中的 三个不同文件停顿二秒弹出不同窗口的批处理


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 147 ::
收藏到网摘: n/a


代码如下:
@echo off
setlocal enableextensions
echo %time%
call :ProcDelay 200
echo %time%
goto :start
:ProcDelay delayMSec_
setlocal enableextensions
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k
:_procwaitloop
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k
set /a diff_=%now_%-%start_%
if %diff_% LSS %1 goto _procwaitloop
endlocal & goto :start
if "%1"=="d:\劲舞团" start d:\劲舞团
:start
start d:\劲舞团\patcher.exe
setlocal enableextensions
echo %time%
call :ProcDelay 200
echo %time%
goto :start
:ProcDelay delayMSec_
setlocal enableextensions
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k
:_procwaitloop
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k
set /a diff_=%now_%-%start_%
if %diff_% LSS %1 goto _procwaitloop
endlocal & goto :start
if "%1"=="d:\劲舞团" start d:\劲舞团
:start
start d:\劲舞团\劲舞团无列表补丁.exe
setlocal enableextensions
echo %time%
call :ProcDelay 200
echo %time%
goto :start
:ProcDelay delayMSec_
setlocal enableextensions
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set start_=%%h%%i%%j%%k
:_procwaitloop
for /f "tokens=1-4 delims=:. " %%h in ("%time%") do set now_=%%h%%i%%j%%k
set /a diff_=%now_%-%start_%
if %diff_% LSS %1 goto _procwaitloop
endlocal & goto :start
if "%1"=="d:\劲舞团" start d:\劲舞团
:start
start d:\劲舞团\劲舞团无响应补丁.exe
echo 补丁执行结束
pause
exit