#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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] |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|