使用vbs在一个IE窗口中创建一个新选项卡 [英] use vbs create a new tab in one IE window

查看:355
本文介绍了使用vbs在一个IE窗口中创建一个新选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码(VBScript)打开2个网址:

I use the following code(VBScript) to open 2 urls:

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.google.com"
IE.Visible = True

Set IE2 = CreateObject("InternetExplorer.Application")
IE2.Navigate "http://www.youtube.com"
IE2.Visible = True





当我执行代码时,会出现两个IE窗口,它们会导航到我想要的URL。



但我不想要2个WINDOWS。我希望在一个窗口中有两个标签。如何编写代码?

在线等待!谢谢!



When I execute the code, then TWO IE windows appear and they navigate to the url as I wanted.

But I don't want 2 WINDOWS. I want 2 Tabs in ONE WINDOW. How to write the code?
Waiting online! Thank you!

推荐答案

你好



试试这个



const navOpenInNewTab =&h0800



设置IE = CreateObject(InternetExplorer.Application)

IE.Navigatehttp: //www.google.com

IE.Visible = True





IE.Navigatehttp ://www.youtube.com,CLng(navOpenInNewTab)





Pascal PONZONI
Hello

try this

const navOpenInNewTab = &h0800

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://www.google.com"
IE.Visible = True


IE.Navigate "http://www.youtube.com",CLng(navOpenInNewTab)


Pascal PONZONI


这篇关于使用vbs在一个IE窗口中创建一个新选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆