Home > Software engineering >  Visual Basic implementation automatically open IE and enter account password to log in
Visual Basic implementation automatically open IE and enter account password to log in

Time:11-12

Website is to limit the number of user login, so want to be a cycle has been input account password to log in, to the end of the automatic login is successful, a great god some directions, thank you

CodePudding user response:

Why use IE without Webbrowser, explain you based on the zero, but the question you asked are more advanced,
To learn VB6 automatic operation Webbrowser,
Beginners can try button elves, more a sense of accomplishment,

CodePudding user response:

Google search vb shell. Internetexplorer

CodePudding user response:

You try to repeatedly so the verification code? If embedded webbrowser good high, if you want to control the ie is not can't, just not too convenient, analog keyboard operation, direct dom element control,

Send a VBS under for your reference:
 Set wmi=GetObject (" winmgmts: \ \. ") 
The Set pro_s=wmi. Instancesof (" win32_process ")
For Each p In pro_s
If p.n ame="iexplore. Exe" then p.t erminate ()
Next
The Set Wshell=WScript. CreateObject (" WScript. Shell ")
The Set ie=WScript. CreateObject (" InternetExplorer. Application ")
Ie. Visible=true
Ie. Navigate "http://bbs.gdmm.com/logging.php? Action=login
"While Internet explorer. Busy
Wscript. Sleep 200
Wend
Wscript. Sleep 200
Ie. The Document. The login. The username. Value="https://bbs.csdn.net/topics/test107"
Ie. The Document. The login. Password3. Value="https://bbs.csdn.net/topics/123456"
Ie. Document. GetElementsByTagName (" li ") (22). Click
Ie. The Document. The 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

Target site already does not exist, you can read the code migration to you that the above code is saved as a text format, suffix to VBS can run,
  • Related