Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-12-2006, 02: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
TIMEOUT = False
Explorer.ToolBar = 1

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

Thank you.
Reply With Quote
  #2  
Old 04-13-2006, 05: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:

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

Dim g_shell
Set g_shell = CreateObject("WScript.Shell")
g_shell.run "Http://www.vandyke.com"
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
Reply


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 01:59 PM.