Ticket #1956: 3.3.7.10 COM error getting reference to document in frame.au3

File 3.3.7.10 COM error getting reference to document in frame.au3, 1.6 KB (added by DaleHohm, 13 years ago)

reproducer

Line 
1$oErrorHandler = ObjEvent("AutoIt.Error", "ErrorHandler")
2
3$oIE = ObjCreate("InternetExplorer.Application")
4$oIE.visible = True
5$oIE.navigate("http://www.w3.org/WAI/UA/TS/html401/cp0101/0101-FRAME-TEST.html")
6$oFrame = $oIE.document.frames("target1")
7$oDoc = $oFrame.document
8
9ConsoleWrite("IsObj: " & IsObj($oDoc) & @CRLF)
10
11
12Func ErrorHandler()
13        $ErrorScriptline = $oErrorHandler.scriptline
14        $ErrorNumber = $oErrorHandler.number
15        $ErrorNumberHex = Hex($oErrorHandler.number, 8)
16        $ErrorDescription = StringStripWS($oErrorHandler.description, 2)
17        $ErrorWinDescription = StringStripWS($oErrorHandler.WinDescription, 2)
18        $ErrorSource = $oErrorHandler.Source
19        $ErrorHelpFile = $oErrorHandler.HelpFile
20        $ErrorHelpContext = $oErrorHandler.HelpContext
21        $ErrorLastDllError = $oErrorHandler.LastDllError
22        $ErrorOutput = ""
23        $ErrorOutput &= "--> COM Error Encountered in " & @ScriptName & @CRLF
24        $ErrorOutput &= "----> $ErrorScriptline = " & $ErrorScriptline & @CRLF
25        $ErrorOutput &= "----> $ErrorNumberHex = " & $ErrorNumberHex & @CRLF
26        $ErrorOutput &= "----> $ErrorNumber = " & $ErrorNumber & @CRLF
27        $ErrorOutput &= "----> $ErrorWinDescription = " & $ErrorWinDescription & @CRLF
28        $ErrorOutput &= "----> $ErrorDescription = " & $ErrorDescription & @CRLF
29        $ErrorOutput &= "----> $ErrorSource = " & $ErrorSource & @CRLF
30        $ErrorOutput &= "----> $ErrorHelpFile = " & $ErrorHelpFile & @CRLF
31        $ErrorOutput &= "----> $ErrorHelpContext = " & $ErrorHelpContext & @CRLF
32        $ErrorOutput &= "----> $ErrorLastDllError = " & $ErrorLastDllError & @CRLF
33        ConsoleWrite($ErrorOutput & @CRLF)
34        Return
35EndFunc   ;==>__IEInternalErrorHandler