CODE: [Copy to clipboard]
'脚本和密码文本"163.txt"在同一个目录下运行
On Error Resume Next
Set fso=CreateObject("Scripting.FileSystemObject")
Set fr=fso.OpenTextFile("163.txt")
Do Until fr.AtEndOfStream
Login fr.ReadLine
Loop
fr.Close
Set fr=Nothing
Set fso=Nothing
Function Login(text)
Set Wshell=WScript.CreateObject("WScript.Shell")
AppName="163邮箱"
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=True
text=Trim(text)
ID=Left(text,InStr(text,"@")-1)
PW=Right(text,len(text)-instrrev(text,"-"))
For i=1 To 6 Step 1
ie.navigate "http://mail.163.com"
Do
Wscript.Sleep 200
Loop Until ie.ReadyState=4
ie.Document.login163.username.value=ID
ie.Document.login163.password.value=PW
WShell.SendKeys "~" ' 回车
Wscript.Sleep 5000 ' 根据自己的网速确定等待时间
Wshell.SendKeys "^W" ' 关闭IE窗口
Next
Set ie=Nothing
Set Wshell=Nothing
End Function