第一种方法 InternetExplorer.Application

StartURL = "www.cnhackhy.com" 
set ie = CreateObject("InternetExplorer.Application") 
IE.Visible = true 
IE.Navigate StartURL 

第二种方法 WScript.Shell

dim Wsh 
Set Wsh=WScript.CreateObject("WScript.Shell") 
On error Resume Next 
objeShell.Run("http://www.baidu.com")

下面的代码就是自动打开百度并输入华域联盟进行搜索的代码

Dim wsh,ie 
Set wsh = CreateObject("wscript.shell") 
Set ie = WScript.CreateObject("InternetExplorer.Application") 
URL="http://www.baidu.com" 
code="华域联盟" 
ie.visible = True 
ie.navigate URL 
WScript.Sleep 1000 
wsh.AppActivate "百度一下,你就知道 " ' 引号中填浏览器最上面的标题 
wsh.Run "cmd.exe /c echo " & code & "| clip.exe", vbHide 
wsh.SendKeys "^v" 
wsh.SendKeys "{ENTER}" 

 用vbs实现网站自动登录

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 " " ' 引号中填浏览器最上面的标题 
WScript.Sleep 1000*1 
wsh.SendKeys "帐号" '引号中填帐号 
WScript.Sleep 1000*1 
wsh.SendKeys "{TAB}" 
WScript.Sleep 1000*1 
wsh.SendKeys "密码" '引号中填密码 
WScript.Sleep 1000*1 
wsh.SendKeys "{ENTER}" 

好了,内容就介绍到这,希望大家以后多多支持华域联盟。

声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。