閑的蛋疼今天~
電腦瀏覽器記住密碼功能好蛋疼~有時(shí)候不好用~~登錄CMCC-EDU的時(shí)候老是要輸入帳號(hào)。。看了看登錄頁面的網(wǎng)頁源碼~~擼起個(gè)Vbs腳本~讀取配置文件,簡單實(shí)現(xiàn)了自己登錄CMCC-EDU,把帳號(hào)存在同級(jí)目錄下就好。一行帳號(hào),一行密碼。
好久不用vbs~都忘記了快~~
'自動(dòng)登錄CMCC-EDU'By:Seven 2014/2/25On Error Resume NextSet WshShell = CreateObject("wscript.Shell")Set fso = CreateObject("scripting.filesystemobject")Set ie = CreateObject("InternetExplorer.Application")Set list = fso.OpenTextFile("帳號(hào).txt")ie.Visible=1ie.Navigate "www.baidu.com"Do Until ie.ReadyState =4 : WScript.Sleep 200 : Loopie.document.getElementByIdx_x("bpssUSERNAME").Value=List.ReadLineie.document.getElementByIdx_x("bpssBUSPWD").Value=List.ReadLineSet AllElement=ie.DocumentFor i=0 To AllElement.all.length-1if AllElement.all(i).tagname="INPUT" Thenif AllElement.all(i).value="登錄" Then AllElement.all(i).clickEnd IfEnd ifNext效果圖

新聞熱點(diǎn)
疑難解答
圖片精選