﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1973	_IEAttach failes and crashes on some special window constellations	Samoth	Gary	"When there is a ''Web Browser'' window open not being a ''TopLevelContainer'' the function '''_IEAttach''' will exit with an error:

{{{
E:\Bin\autoit\install\Include\IE.au3 (2675) : ==> The requested action with this object has failed.:
Return SetError($_IEStatus_Success, 0, HWnd($o_object.HWnd()))
Return SetError($_IEStatus_Success, 0, HWnd($o_object.HWnd()^ ERROR
}}}

This can be solved by modifying '''IE.au3''' checking whether your ''IE object'' is a ''TopLevelContainer'' and respond accordingly in '''Func _IEPropertyGet(ByRef $o_object, $s_property)''' from line 2669 on as described in my [http://www.autoitscript.com/forum/topic/111269-ieau3-ieattach/page__view__findpost__p__909443 post] in the forum. The problem is pretty well caught down over there.


{{{
[...] lines 1-2668
Case $s_property = ""hwnd""
    If Not __IEIsObjType($o_object, ""browser"") Then
        __IEErrorNotify(""Error"", ""_IEPropertyGet"", ""$_IEStatus_InvalidObjectType"")
        Return SetError($_IEStatus_InvalidObjectType, 1, 0)
    EndIf
    ;--------------OLD-CODE:
    ;Return SetError($_IEStatus_Success, 0, HWnd($o_object.HWnd()))
    ;--------------NEW-CODE:
    If $o_object.TopLevelContainer Then
        Return SetError($_IEStatus_Success, 0, HWnd($o_object.HWnd()))
    Else
        Return SetError($_IEStatus_Success, 0, 0)
    EndIf
    ;--------------:NEW-CODE
[...]
}}}


It was the same problem in ticket [http://www.autoitscript.com/trac/autoit/ticket/1415 #1415] but this is already closed for not being precise enough. I hope this ticket will help out. As said in this [http://www.autoitscript.com/forum/topic/110303-ieattach-issue/page__view__findpost__p__909482 post] I should open a ticket. And I searched for a double before finding only this closed one ;-)"	Bug	closed		Standard UDFs	3.3.6.1	None	No Bug	IE UDF HWND Error _IEAttach	johannes@…
