While ie.Busy or ie.ReadyState <> 4:Wend
ie.Quit '自己看情况要不要吧。什么意思自己看的懂。
-------------------------------作者: ednykissyou 时间: 2010-5-23 10:34 标题: 求vbs:自动登录,70秒自动刷新,2小时换下一账号
'清除cookie
on error resume next
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile("C:\Documents and Settings\Administrator\Local Settings\History\*.*"),True
'fso.DeleteFile("C:\Documents and Settings\Administrator\Local Settings\Temp\*.*"),True
fso.DeleteFile("C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\*.*"),True
fso.DeleteFile("C:\WINDOWS\Temp\Cookies\*.*"),True
fso.DeleteFile("C:\WINDOWS\Temp\History\*.*"),True
fso.DeleteFile("C:\Documents and Settings\Administrator\cookies\*.*"),True
fso.DeleteFile("C:\WINDOWS\Temp\Temporary Internet Files\*.*"),True
'登录
do
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=true
ie.navigate "http://www.5tu.cn/logging.php?action=login"
Do
Wscript.Sleep 5000
loop Until ie.ReadyState=4
ie.document.getElementById("username").value="the123456"
ie.document.getElementById("password").value="the123456"
ie.document.getElementById("loginsubmit").click
'刷新
DIM IE
SET IE = CREATEOBJECT("INTERNETEXPLORER.APPLICATION")