在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
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
算了..自己号登上去不让发
set ws=createobject("wscript.shell")do
wscript.sleep 5000 '执行脚本5秒后开始发送
ws.sendkeys"^v"
ws.sendkeys"{enter}"
ws.sendkeys"{enter}"
wscript.sleep 1000 '暂停1秒
loop
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)