在vbs中重复执行二缓亮十次:
egao.vbs
FOR I = 1 TO 20
msgbox "hey,man"
NEXT
在vbs外重复执行二正轿十次:
repeat.bat
@for /L %%i in (1,1,20) do cscript XXX.vbs
循环可以使用while ... wend:Dim objws
Set objws=WScript.CreateObject("wscript.shell"宏坦)
while true
wscript.sleep 5000
objws.RUN "1.bat"
wend
注意:上面的代码会进入死循环,即衡亩会一蔽拦桐直运行。
set WshShell = CreateObject("物正辩WScript.Shell"罩缺)strCommandLine = "%SystemRoot%\system32\清猛notepad.exe" '启动安装程序
WshShell.Run(strCommandLine)
Set objWord = CreateObject("Word.Application")
Set colTasks = objWord.Tasks
Do
If colTasks.Exists("记事本") Then
WScript.Sleep 1000
WshShell.SendKeys "1"
WScript.Sleep 2000
WshShell.SendKeys "2"
Else
objWord.Quit
Wscript.Quit
End If
Loop
算了..自己号登上去不让发
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)