VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Active by windowtitle (

S122 04-12-2006 02:40 PM

Active by windowtitle
I'm using a scrypt that open a new InternetExplorer application everytime. But i would like to acces the one already open, by is windowtitle (let say the window title is 'Vandyke - Microsoft internet Explorer'). Right now, the begening of my scrypt look like that;

#$laguage = "VBScript"
#$interface = "1.0"

Sub Main()

set Explorer = CreateObject ("InternetExplorer.Application)
Explorer.Visible = True
Explorer.ToolBar = 1

Hyperlink = "Http://blabla.wte"
Explorer.Navigate Hyperlink

Thank you.

miked 04-13-2006 05:05 PM

I don't think it's possible to tap into an existing Internet Explorer instance to specify a URL to navigate to, unless you have kept a reference to it (keeping a reference to an object seems to be impossible between times that you've called the script.)

There might be a way to do this with a separate script, but such a solution would be very complicated, unreliable, and would fall outside the scope of this forum.

As an alternative, if you were to enable the Internet Explorer option to "Reuse windows for launching shortcuts" (IE Options / Advanced), then you could conceive of running the URL directly instead trying to use the Internet Explorer object. This wouldn't guarantee that you would always be using the same window unless you always had only one IE window open.

You could run the URL and it would use an existing window.

For example:


# $language = "VBScript"
# $interface = "1.0"

Dim g_shell
Set g_shell = CreateObject("WScript.Shell") "Http://"

All times are GMT -6. The time now is 06:51 AM.