我正在尝试自动化使用嵌入式 IE 实例(ClassnameNN:Internet Explorer_server1)的 GUI。但我无法获取/附加 IE 对象,尝试了多种方法,所有方法都返回错误_IESTATUS_NoMatch
。更具体地说,我正在自动化 McAfee 防病毒软件:
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
我用 IE8、IE9、IE10、IE11 试过这个——每次都一样的结果。
我只需要从 McAfee 扫描结果中读取文本。这个问题还有其他解决方法吗?