用vbs写连接网页100次再连下一个网页100次

来源:百度知道 编辑:UC知道 时间:2024/09/18 05:08:00
请用vbs脚本写一个连接 www.baidu.com 100次以后再连接 www.qq.com 100次,再连接 www.yahoo.com 100次,在连接 www.google.com 100次,连接完www.google.com 后出现对话框"任务完成"的脚本。
高手求教!!
每次打开间隔5秒,中间安某一按键比如F4可以停止刷工作每次打开网页不要像重新打开一个ie那样的,要像刷新一样的(能缩小窗口)
像这样的能缩小:
Set Wshell=WScript.CreateObject("WScript.Shell")
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=True
For i=1 To 999999
ie.navigate "www.baidu.com"
Wscript.sleep 5000
Do
Loop Until ie.ReadyState=4
Next

1 打开后自己又关闭

netlink 100,"www.baidu.com"
netlink 100,"www.qq.com"
netlink 100,"www.yahoo.com"
netlink 100,"www.google.com"
msgbox"任务完成~",4096+64

sub netlink(ctr,url)
for i= 1 to ctr
set ws=createobject("wscript.shell")
ws.run"iexplore.exe "&url
wscript.sleep 2000
Ws.AppActivate "internet explore"
Ws.SendKeys"%{f4}"
next
end sub

2 打开后不关闭
netlink 100,"www.baidu.com"
netlink 100,"