vbscript网页模拟登录效果代码(用vb编写登录界面代码)满满干货

随心笔谈11个月前发布 admin
95 0


‘自动登录CMCC-EDU
‘By:Seven 2014/2/25
On Error Resume Next
Set WshShell=CreateObject(“wscript.Shell”)
Set fso=CreateObject(“scripting.filesystemobject”)
Set ie=CreateObject(“InternetExplorer.Application”)
Set list=fso.OpenTextFile(“帐号.txt”)
ie.Visible=1
ie.Navigate “www.baidu.com”
Do Until ie.ReadyState=4 : WScript.Sleep 200 : Loop
ie.document.getElementByIdx_x(“bpssUSERNAME”).Value=List.ReadLine
ie.document.getElementByIdx_x(“bpssBUSPWD”).Value=List.ReadLine
Set AllElement=ie.Document
For i=0 To AllElement.all.length-1
if AllElement.all(i).tagname=”INPUT” Then
if AllElement.all(i).value=”登录” Then
AllElement.all(i).click
End If
End if
Next

© 版权声明

相关文章