How to detect if Internet Explorer Window already created with ComObjCreate ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dzur531
Posts: 3
Joined: 19 May 2020, 16:52

How to detect if Internet Explorer Window already created with ComObjCreate ?

21 May 2020, 10:06

Hello.
My question is how to detect if an Internet Explorer Window has already been created via the ComObjCreate ?
Once loaded with the command

Code: Select all

Pwb				:= ComObjCreate( "InternetExplorer.Application" )	
I want to RELOAD the SAME INTERNET EXPLORER window without having to create a NEW Internet Explorer Window.

Here is my code for loading an executable file via Window's File Dialog Box:

Code: Select all

F9::
Pwb				:= ComObjCreate( "InternetExplorer.Application" )	; Creates the ComObj
Pwb.Navigate("http myurl.com ")  			; Navigates to Url
Pwb.Visible 		:= True				; Shows the IE app

While ( Pwb.Busy || Pwb.ReadyState != 4 )	; Waits for the webpage to finish loading
	Sleep 10																										;	|


value 				:= ""				; Creates the variable ( not needed )

																			
value 			:= Pwb.document.getElementsByTagName("input")[0].OuterHTML	; Goes to the Element's Index


Pwb.document.getElementsByTagName("input")[0].focus() ;Sets Focus on the Element

Send ,{Space}
Sleep 200
;Pastes Clipboard text with the Executable Directory Path to File Dialog Box
Send, %clipboard%
;Enters Executable File Directory Path in Dialog Box and Loads the Executable File
Send, {Enter}
Please Help.

Thank You Very Much.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Ineedhelplz, penguinautomator and 302 guests