Jump to content

Difficulty with _IEAttach, any alternatives?


Recommended Posts

A website I am interacting with will open a second browser, similiar to a pop-up. I cannot get _IEAttach to create a reference to that new window.

I can use winList to list all open windows and the target window is one of them.

Any work around to _IEAttach?

Link to comment
Share on other sites

see com reference in the help

$oIE=ObjCreate("InternetExplorer.Application.1")   ; Create an Internet Explorer Object 

$EventObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvents")  ; Start receiving Events.

$oIE.url= "http://www.autoitscript.com"  ; Load an example web page
;From now on, the $oIE Object generates events during web page load. 
;They are handled in the event functions shown below. 

;Here you can let the script wait until the user wants to finish. 
...(your code here)... 

$EventObject.stop            ; Tell IE we want to stop receiving Events
$EventObject=0               ; Kill the Event Object
$oIE.quit                    ; Quit IE
$oIE=0                       ; Remove IE from memory (not really necessary)
Exit                         ; End of main script 


; A few Internet Explorer Event Functions. 
; 
; For the full list of IE Event Functions, see the MSDN WebBrowser documentation at: 
; http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/webbrowser.asp 

Func IEEvent_StatusTextChange($Text)
; In the complete script (see link below) we show the contents in a GUI Edit box.
    GUICtrlSetData ( $GUIEdit, "IE Status text changed to: " & $Text & @CRLF, "append" ) 
EndFunc 

Func IEEvent_BeforeNavigate($URL, $Flags, $TargetFrameName, $PostData, $Headers, $Cancel)
; In the complete script (see link below) we show the contents in a GUI Edit box.
; Note: the declaration is different from the one on MSDN. 
  GUICtrlSetData ( $GUIEdit, "BeforeNavigate: " & $URL & " Flags: " & $Flags & @CRLF, "append") 
EndFunc
Link to comment
Share on other sites

1 - using the hwnd of the browser window

_IEAttach( $hWnd, "HWND" )

or

2 - using class and title. Don't forget to replace "My beautifull window" by your target window title.

_IEAttach( "[CLASS:IEFrame;TITLE:My beautifull window]" )

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...