invisible IE7 or IE6 w/MSN toolbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have routinely scripted IE browser windows using the DOM. I often want to
manipulate an invisible instance IE to eather process in the background or to
manipulate it prior to showing it on the screen.

The following code, for example, creates an inisible IE instance, navigates
to a site and then is displayed:

set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate "www.microsoft.com"
Wscript.Sleep 3000
oIE.visible = 1

With IE7 and with IE6 with the MSN Toolbar and its tabs this no longer works
like I want it to. A browser container window is always displayed
immediately after the CreateObject command.

I assume this is because the container can hold many IE instances as tabs.
If this is true, I need to find find object model documentation updates that
tell me how to create a browser instance without tabs so that the visible
attribute will work as I expect it to. I have searched and searched and have
not found this... anyone know if it is available?

My assumption of the cause may be incorrect -- if so, does anyone know how
to work around this another way?

Thanks,

Dale
 
Hi Dale,

The MSN Toolbar has been rebranded to the Live toolbar (but its clsid value
has not changed)

For IE6 - Open a new instance of ie.
Use the Showbrowserbar method to unload the tabbed toolbar (note the Yahoo
companion toolbar also has tabbed browsing) - this will open a new window
without the tabbed browsing toolbar.
Another way is to set the Toolbars property to false for your new window.

For IE7 - Use the inbuilt tabbed browsing i/o the add-in toolbars (the live
toolbar version automatically detects this and switches its own tabbed
browsing interface off). However the users tabbed browsing and popup
blocking settings will determine how the new window will be displayed.

You don't need the sleep command in your script. By default you new IE
instance will remain invisible until the visibility property is set to true.

Other user security settings may also effect the running of your script so
you might consider an executable implementation i/o a scripting solution.

About the Yahoo toolbar - still in beta and very flakey, but you can use the
showbrowserbar method with the appropiate CLSID value of the toolbar.

Regards.
 
Thanks for the reply Rob.

This looks like the right track... I am having trouble finding the CLSID of
the tabbed toolbar. The MSDN ShowBrowserBar docs don't show it and a search
in the registry has been fruitless so far as I have not tripped on the right
search string.

Can you provide any hints?

Thanks again.

Dale
 
Hi Dale,

this is a vb snippet from one of my add-ins
With myWB
.Navigate2 "about:blank"
.Visible = True
r = ShowWindow(myWB.hwnd, 1)
.ShowBrowserBar "{BDAD1DAD-C946-4A17-ADC1-64B5B4FF55D0}", False
IEhwnd = myWB.hwnd
End With
That gives you the clsid of the msn toolbar.

You will find the CLSID of IE toolbars in the

HKCU\Software\Microsoft\Internet Explorer\Toolbars\WebBrowser (user
toolbars)
or

HKLM\Software\Microsoft\Internet Explorer\Toolbars (machine toolbars)


From there you can select the registry entry under the
HKCR\CLSID\{toolbarCLSID} to view its implementation details in regedit.

or search your HKCR node for data values that match the name of the toolbar
as it appears in the toolbars menu.

I have a listing of toolbar clsid's at
http://www.iecustomizer.com/ietoolbars/

but it is hard to keep up-to-date and may be missing some. I am pretty sure
that the new Live toolbar uses the same CLSID as the old MSN toolbar that it
replaces, but you will have to also include the showbrowserbar method for
the Yahoo toolbar.

The showbrowserbar method does not fail if the toolbar is not present on the
machine, so you don't have to detect if it is installed, but it may be handy
to detect if BHO's are enabled, the browser version, and if its IE7 if
tabbed browsing is enabled.
Regards.
 
Thanks for sticking with me Rob.

Unfortunately no joy yet.

The clsid you reference in fact will control the "Windows Live Toolbar", but
the tabs are not affected by this setting. In fact you cannot control
whether the tabs are present with any of the options in View -> Toolbars or
Explorer Bar. The presence of the tabs is only controlled in the "Turn on
Tabbed browsing" checkbox in the unique "Windows Live Toolbar Options" dialog
(that you open by clicking the hammer icon on the Windows Live Toolbar).

I tried setting the ShowBrowserBar to False for every clsid in the registry
pods you pointed to and none of them affected the tab bar.

Am I doing something wrong or is there method or property to control the tabs?

Thanks in advance for further consideration you are willing to give this
question.

Thanks,

Dale
 
Back
Top