
Detecting IE windows/urls from script
Another question related to this:
I have a script , which needs to:
- make some system config changes to IE, with some instances of IE possible open
- detect all instances of IE and shut them down (no problem using
Shellapp.windows as below, and window.quit)
- restart IE using CreateObject("internetexplorer.application","ie_") and navigate to some url
Are there timing issues with shutting down and restarting IE so that IE config. changes
take effect?
Thanks,
- Mitch Gallant
Quote:
> Unfortunately, the WScript.ConnectObject method doesn't work with an existing IE object. ScriptX (www.meadroid.com) has the capability to sink events of an arbitrary IE object instance (see the wshie.vbs example in the gen_samples folder, assuming you have ScriptX downloaded and installed).
> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US
> --
> > btw, is it possible to handle events fired by one of these enumerated
> > InternetExplorer window objects instantiated in this enumeration ??
> > I already know about the approach using:
> > set ie = wscript.createobject("internetexplorer.application","ie_") etc..
> > from a thread "IE.App eventing with Jscript" indicating some problems
> > with the event handlers firing properly.
> > Thanks,
> > - Mitch
> > > Thanks Michael. This is what I was hoping to find.
> > > - Mitch
> > > > set shellApp = createobject("shell.application")
> > > > for each w in shellApp.windows
> > > > wscript.echo _
> > > > "typename(w) -> " & typename(w) & vbcrlf _
> > > > & "typename(w.document) -> " & typename(w.document) & vbcrlf _
> > > > & "w.locationUrl -> " & w.locationUrl
> > > > next
> > > > --
> > > > Michael Harris
> > > > Microsoft.MVP.Scripting
> > > > Seattle WA US
> > > > --
> > > > > Is it possible to detect the url of a IE pop up browser subwindow
> > > > > (or a main IE window) using wsh / vbscript ?
> > > > > .. or must one enumerate the system windows/processes to get at this information?
> > > > > Thanks,
> > > > > - Mitch Gallant
> > > > > http://home.istar.ca/~neutron/java.html