vbs打开ie两种方法 在VBScript中启动IE浏览器的实现代码

用VBS打开网页,减少IE广告, 不错的东东,是在网上收集的,你也可以实现网页的自动登录等

第一种方法 InternetExplorer.Application

 StartURL = "www.0133.cn" 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}" 

以上就是vbs打开ie两种方法 在VBScript中启动IE浏览器的实现代码的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » 脚本专栏