The first method of Internetexplorer.application
Copy Code code as follows:
StartURL = "Www.jb51.net"
Set IE = CreateObject ("Internetexplorer.application")
Ie. Visible = True
Ie. Navigate StartURL
The second method of Wscript.Shell
Copy Code code as follows:
Dim Wsh
Set wsh=wscript.createobject ("Wscript.Shell")
On Error Resume Next
Wsh.run "Www.jb51.net"
The code below is the code that automatically opens Baidu and enters the cloud-dwelling community for searching.
Copy Code code as follows:
Dim Wsh,ie
Set WSH = CreateObject ("Wscript.Shell")
Set ie = WScript.CreateObject ("Internetexplorer.application")
Url= "Http://www.baidu.com"
Code= "cloud-dwelling community"
Ie.visible = True
Ie.navigate URL
Wscript.Sleep 1000
Wsh. AppActivate "Baidu a bit, you know" ' quotes in the top of the browser title
Wsh. Run "cmd.exe/c echo" & Code & | Clip.exe ", vbhide
Wsh. SendKeys "^v"
Wsh. SendKeys ' {ENTER} '
Copy Code code as follows:
Dim Wsh,ie
Set WSH = CreateObject ("Wscript.Shell")
Set ie = WScript.CreateObject ("Internetexplorer.application")
Url= "Http://www.baidu.com"
Ie.visible = True
Ie.navigate URL
Wscript.Sleep 1000*5
Wsh. AppActivate "" ' quotes in the top of the browser title
Wscript.Sleep 1000*1
Wsh. SendKeys "Account" "quotes" fill in the account number
Wscript.Sleep 1000*1
Wsh. SendKeys "{tab}"
Wscript.Sleep 1000*1
Wsh. SendKeys Password in quotes
Wscript.Sleep 1000*1
Wsh. SendKeys ' {ENTER} '