“在新标签页中打开”与Vbscript [英] "open in new tab" with Vbscript
问题描述
我无法使用WebBrowser对象的Navigate方法获取navOpenInNewTab BrowserNavConstants标志工作
这里的评论:
http://msdn.microsoft.com/en- us / library / aa752093(v = vs.85).aspx
建议使用cLng来转换常量:
const navOpenInNewTab =& ; h0800
设置oIE = CreateObject(" InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate" http://msdn.microsoft.com ",CLng(navOpenInNewTab)
但这会打开一个新的窗口,而不是新选项卡。
以
为单位的资料使用VB或Vb脚本在IE的新标签页中打开网址
http://social.msdn.microsoft.com/Forums/ EN / iewebdevelopment /线程/ 067b6c94-e680-4e15-8cd4-72 f055c8d8fb
可以在VB中运行,但它在Windows XP上的Vbscript中不起作用。
有人有这个功能可以工作在Vbscript?
有没有人有这个能力在Vbscript中工作?
Enum BrowserNavConstants
navOpenInNewWindow = 1
navNoHistory = 2
navNoReadFromCache = 4
navNoWriteToCache = 8
navAllowAutosearch = 16
navBrowserBar = 32
navHyperlink = 64
navEnforceRestricted = 128
navNewWindowsManaged = 256
navUntrustedForDownload = 512
navTrustedForActiveX = 1024
navOpenInN ewTab = 2048
navOpenInBackgroundTab = 4096
navKeepWordWheelText = 8192
  ; navVirtualTab = 16384
navBlockRedirectsXDomain = 32768
navOpenNewForegroundTab = 65536
结束枚举
见 http://msdn.microsoft.com/en-us/library/dd565688(v = vs.85)的.aspx
i can not get the navOpenInNewTab BrowserNavConstants flag to work
with the Navigate method of the WebBrowser object
a comment here:
http://msdn.microsoft.com/en-us/library/aa752093(v=vs.85).aspx
suggests to use cLng to cast the constant:
const navOpenInNewTab = &h0800
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate "http://msdn.microsoft.com", CLng(navOpenInNewTab)
but this opens a new window, not a new tab.
the material at
Open a url in New tab of IE using VB or Vb Script
http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/067b6c94-e680-4e15-8cd4-72f055c8d8fb
may work in VB, but it does not work in Vbscript on Windows XP.
has anyone gotten this capability to work in Vbscript?
has anyone gotten this capability to work in Vbscript?
Enum BrowserNavConstants
navOpenInNewWindow = 1
navNoHistory = 2
navNoReadFromCache = 4
navNoWriteToCache = 8
navAllowAutosearch = 16
navBrowserBar = 32
navHyperlink = 64
navEnforceRestricted = 128
navNewWindowsManaged = 256
navUntrustedForDownload = 512
navTrustedForActiveX = 1024
navOpenInNewTab = 2048
navOpenInBackgroundTab = 4096
navKeepWordWheelText = 8192
navVirtualTab = 16384
navBlockRedirectsXDomain = 32768
navOpenNewForegroundTab = 65536
End Enum
see http://msdn.microsoft.com/en-us/library/dd565688(v=vs.85).aspx
这篇关于“在新标签页中打开”与Vbscript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!