閑的蛋疼今天~
電腦瀏覽器記住密碼功能好蛋疼~有時候不好用~~登錄CMCC-EDU的時候老是要輸入帳號。。看了看登錄頁面的網頁源碼~~擼起個Vbs腳本~讀取配置文件,簡單實現了自己登錄CMCC-EDU,把帳號存在同級目錄下就好。一行帳號,一行密碼。
好久不用vbs~都忘記了快~~
'自動登錄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("帳號.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
效果圖
新聞熱點
疑難解答