nazikus
nazikus

Reputation: 529

Cannot obtain IE object in AutoIt script - _IESTATUS_NoMatch

I'm trying to automate GUI which utilizes an embedded IE instance (ClassnameNN: Internet Explorer_server1). But I cannot obtain/attach IE object, tried multiple ways and all of them return error _IESTATUS_NoMatch. To be more specific I'm automating McAfee antivirus:

AutoItSetOption("WinTitleMatchMode", 2)

$oie = _IEAttach("McAfee AntiVirus", "embedded")
$oie = _IEAttach("McAfee AntiVirus", "embedded", 1)
$oie = _IEAttach("[CLASS:Internet Explorer_Server; INSTANCE:1]", "embedded")
$oie = _IEAttach("[CLASS:Internet Explorer_Server; INSTANCE:1]", "text")
$oie = _IEAttach("", "instance", 1)
$oie = _IEAttach("")
$oie = _IEAttach("", "embedded")
$sText = _IEBodyReadText($oie)

$h_result = WinGetHandle("McAfee AntiVirus", "")
$o_result = __IEControlGetObjFromHWND($h_result)

; each _IEAttach() returns:
; --> IE.au3 T3.0-1 Warning from function _IEAttach, $_IESTATUS_NoMatch

I tried this with IE8, IE9, IE10, IE11 - the same result every time.

All I need is to read text from McAfee scan results. Any other workaround to this issue?

Upvotes: 0

Views: 4860

Answers (1)

Milos
Milos

Reputation: 2946

Does this works for you?

#RequireAdmin
Opt("WinSearchChildren", 1) ;0=no, 1=search children also
#include <IE.au3> 

AutoItSetOption("WinTitleMatchMode", 2)
$HWND = WinGetHandle("McAfee AntiVirus", "")
$oie = _IEAttach($HWND, "embedded")

ConsoleWrite(_IEDocReadHTML($oIE) & @CRLF)

Upvotes: 1

Related Questions