522235677 (张三)当前离线
少校
do ........... loop复制代码
评分人数
CrLf 当前离线
论坛巡查
WScript.exe /T:1 test.vbs复制代码
t=timer do while timer-t<1 ........... loop复制代码
id=setTimeOut("loopSub()",0) setInterval("clearTimeOut(id)",1000)复制代码
TOP
Dim objShell,ret,wshshell set wshshell=createobject("wscript.shell") Set objShell = CreateObject("WSCript.Shell") t=timer do while timer-t<WScript.Arguments(1) ret = objShell.Appactivate(WScript.Arguments(0)) If ret Then wshshell.sendkeys "{tab}" wscript.quit (10) end if loop复制代码
CDbl(WScript.Arguments(1))复制代码
Dim objShell,ret,wshshell set wshshell=createobject("wscript.shell") Set objShell = CreateObject("WSCript.Shell") t=timer do while timer-t<CDbl(WScript.Arguments(1)) ret = objShell.Appactivate(WScript.Arguments(0)) If ret Then wshshell.sendkeys "{tab}" wscript.quit (10) end If Loop复制代码
yu2n 当前离线
上尉
Const nTimeOut = +5 ' 超时时间(秒) Dim dtStart, dtEnd dtStart = Now() dtEnd = DateAdd("s", nTimeOut, Now()) Do While DateDiff("s", Now(), dtEnd) > 0 WScript.Sleep 200 ' Do Something .. Loop ' Do Something .. Msgbox DateDiff("s", dtStart, Now()) & " 秒过去鸟。不要嫌代码长长长 ..."复制代码
shelluserwlb 当前离线
一级士官