Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet Explorer child windows in Object Model

Status
Not open for further replies.

JL42

Technical User
Jun 23, 2003
12
US
Where, in the Internet Explorer Object can I find the child windows of the parent window?

I opened IE6, then shift+click on a link, then run the following code

set oie = getobject( ,"InternetExplorer.Application")
'set a breakpoint on the next statement
junk = "garbage"

I then use the View Locals window to browse around my oie object, which is the first IE window opened. I can browse through the properties and see the url, the body under the document, and so forth. I can't seem to be able to locate the second window. I keep looking for a windows collection, and seem to just end up in recursive layers of the parent.

HELP?
 
thanks to billchris, the key is the shell.shellwindows collection, returning a seperate opject for each IE window (but not webbrowser windows, hmmmmm)
Here is a short VBSCRIPT demo.

=====================================
dim objShell, objShellWindows, i

set objShell = createObject("Shell.Application")
set objShellWindows = objShell.Windows

if (not objShellWindows is nothing) then
for i = 0 to objShellWindows.count - 1
msgbox objShellWindows.Item(i).locationurl
next
end if

set objShellWindows = nothing
set objShell = nothing

'thanks to member billchris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top