Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 04-12-2006, 01:40 PM
S122 S122 is offline
Registered User
Join Date: Jan 2006
Posts: 2
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.
Reply With Quote
Old 04-13-2006, 04:05 PM
miked's Avatar
miked miked is offline
Registered User
Join Date: Feb 2004
Posts: 2,040
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")
g_shell.run "Http://www.vandyke.com"
VanDyke Software
Technical Support
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 06:40 PM.