網站是限制用戶登錄數量的,所以要做個回圈一直輸入賬號密碼登錄,到登錄成功自動結束,求大神指點指點,謝謝
uj5u.com熱心網友回復:
為什么要用IE而不用Webbrowser,說明你在這塊0基礎,但你問的問題屬于更高級的。去學習VB6自動操作Webbrowser吧。
初學可以試試按鈕精靈,更有成就感。
uj5u.com熱心網友回復:
google搜索 vb shell.internetexploreruj5u.com熱心網友回復:
你這樣反復試會試出驗證碼的吧?如果嵌入webbrowser還是挺好高的。如果要控制ie也不是沒辦法,只是不是太方便,模擬鍵鼠操作,直接dom元素控制。發一個vbs的給你參考下:
Set wmi=GetObject("winmgmts:\\.")
Set pro_s=wmi.instancesof("win32_process")
For Each p In pro_s
if p.name="iexplore.exe" then p.terminate()
Next
Set Wshell=WScript.CreateObject("WScript.Shell")
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=true
ie.navigate "http://bbs.gdmm.com/logging.php?action=login"
While ie.busy
wscript.sleep 200
Wend
Wscript.Sleep 200
ie.Document.login.username.value="https://bbs.csdn.net/topics/test107"
ie.Document.login.password3.value="https://bbs.csdn.net/topics/123456"
ie.Document.getElementsByTagName("li")(22).click
ie.Document.login.answer.value="https://bbs.csdn.net/topics/IBM"
Wscript.Sleep 2000
ie.document.loginform.submit()
Wscript.Sleep 500
wshell.sendkeys "{enter}"
WScript.Sleep 5000
ie.quit
Wscript.quit目標網站早已不存在,你可以讀懂代碼移植到你那上面。 代碼保存為文本格式,后綴名改成vbs即可運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/16837.html
標籤:VB基礎類
上一篇:vb.net如何獲取當前行程的cpu和記憶體使用率?
下一篇:通過vba模擬點擊網頁鏈接
