Method 1: InternetExplorer. Application
Copy codeThe Code is as follows: StartURL = "www.jb51.net"
Set IE = CreateObject ("InternetExplorer. Application ")
IE. Visible = true
IE. Navigate StartURL
Method 2 WScript. Shell
Copy codeThe Code is as follows: dim Wsh
Set Wsh = WScript. CreateObject ("WScript. Shell ")
On error Resume Next
Wsh. Run "www.jb51.net"
The following code automatically opens Baidu and enters the script home for searchCopy codeThe Code is as follows: Dim wsh, ie
Set wsh = CreateObject ("wscript. shell ")
Set ie = WScript. CreateObject ("InternetExplorer. Application ")
URL = "http://www.baidu.com"
Code = "script home"
Ie. visible = True
Ie. navigate URL
WScript. Sleep 1000
Wsh. AppActivate "Baidu, you will know" 'Fill in the top title of the browser in quotation marks
Wsh. Run "cmd.exe/c echo" & code & "| clip.exe", vbHide
Wsh. SendKeys "^ v"
Wsh. SendKeys "{ENTER }"
Copy codeThe Code is 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 "" 'Fill in the top title of the browser in quotation marks
WScript. Sleep 1000*1
Wsh. SendKeys "Account "'
WScript. Sleep 1000*1
Wsh. SendKeys "{TAB }"
WScript. Sleep 1000*1
Wsh. SendKeys "password" 'enter the password in quotation marks
WScript. Sleep 1000*1
Wsh. SendKeys "{ENTER }"