lfast Posted November 14, 2010 Share Posted November 14, 2010 Another NubieQ: How do I create an _IE.au3 object for an existing explorer window? I can find the window and get a Handle using the non-IE functions. What's the magic incantation to convert a Handle into an Object? Link to comment Share on other sites More sharing options...
wakillon Posted November 14, 2010 Share Posted November 14, 2010 Another NubieQ: How do I create an _IE.au3 object for an existing explorer window? I can find the window and get a Handle using the non-IE functions. What's the magic incantation to convert a Handle into an Object? See _IEAttach ( Attach to the specified instance of Internet Explorer ) in help file ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
lfast Posted November 14, 2010 Author Share Posted November 14, 2010 Thanks again, Wakillon! Link to comment Share on other sites More sharing options...
wakillon Posted November 15, 2010 Share Posted November 15, 2010 (edited) example : detect only ie instance with http://www.youtube.com/watch?v= in the url and close them ! #include <IE.au3> #include <Array.au3> ShellExecute ( "iexplore.exe", "http://www.google.com/translate_t" ) ShellExecute ( "iexplore.exe", "http://www.autoitscript.com/forum/topic/122085-how-to-get-from-handle-to-object/page__gopid__847418#entry847418" ) ShellExecute ( "iexplore.exe", "http://www.youtube.com/watch?v=Dwimc4cvUmQ&feature=aso" ) ShellExecute ( "iexplore.exe", "http://www.google.fr/" ) ShellExecute ( "iexplore.exe", "http://www.youtube.com/watch?v=D7K3wFXJFsQ" ) Sleep ( 5000 ) Dim $oIEArray[1], $i = 1 While 1 $oIE = _IEAttach ( "http://www.youtube.com/watch?v=", "URL", $i ) If @error = $_IEStatus_NoMatch Then ExitLoop _ArrayAdd ( $oIEArray, $oIE ) $i += 1 WEnd ConsoleWrite ( "Number of browser instances in the array: " & UBound ( $oIEArray ) -1 & @Crlf ) For $_I = 1 To UBound ( $oIEArray ) -1 _IEQuit ( $oIEArray[$_I] ) Next Edited November 15, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now