empty75 Posted November 17, 2006 Posted November 17, 2006 Please help i am using the v3.2.1.11 (beta) of autoit. I am using the IE.au3 tools to read the html of a webpage and get info from a couple of tags. $oIE = _IECreate ("www.somewebpage.com", 0, 0, 1) $oTags = _IETagNameGetCollection ($oIE, "META") ;Search for all Meta tags For $otheTag In $oTags IF $otheTag.Name = "description" Then ;Find the description meta tag $fnDesc = $otheTag.content ; get the data endif IF $otheTag.Name = "keywords" Then $keyWords = $otheTag.content EndIf Next $oTags = _IETagNameGetCollection ($oIE, "TITLE") For $otheTag In $oTags $fnTitle = StringTrimRight ($otheTag.innerText,11) $fnTitle = _StringStripNonAlNum($fnTitle) Next _IEQuit($oIE) ;close the IE app This ocasionally crashes the script out, so i found out about _IEErrorHandlerRegister(), and _IEErrorHandlerDeRegister(). I placed these at the top and bottom of my code segment, and it no longer crashes. But now if there is a problem the above code is now skipped, which causes a problem latter on when a empty variable $fnTitle is passed to INetGet(). Is there any way to trap these errors and attempt to recreate the oIE object ? The errors returned by _IEErrorHandlerRegister(), to the script console were. --> COM Error Encountered in DL MultiAID-vb1.85.au3 ----> $IEComErrorScriptline = 340 ----> $IEComErrorNumberHex = 800706BE ----> $IEComErrorNumber = -2147023170 ----> $IEComErrorWinDescription = The remote procedure call failed. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = ----> $IEComErrorLastDllError = 997 --> IE.au3 Error from function _IECreate (Browser Object Creation Failed) --> IE.au3 Error from function _IETagNameGetCollection, $_IEStatus_InvalidDataType --> COM Error Encountered in DL MultiAID-vb1.85.au3 ----> $IEComErrorScriptline = 294 ----> $IEComErrorNumberHex = 000000A9 ----> $IEComErrorNumber = 169 ----> $IEComErrorWinDescription = Variable is not of type 'Object'. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = ----> $IEComErrorLastDllError = 0 --> IE.au3 Error from function _IETagNameGetCollection, $_IEStatus_InvalidDataType --> COM Error Encountered in DL MultiAID-vb1.85.au3 ----> $IEComErrorScriptline = 304 ----> $IEComErrorNumberHex = 000000A9 ----> $IEComErrorNumber = 169 ----> $IEComErrorWinDescription = Variable is not of type 'Object'. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = ----> $IEComErrorLastDllError = 0 --> IE.au3 Error from function _IEQuit, $_IEStatus_InvalidDataType Sorry for all that, any help would be appreciated. As an aside i am having problems with InetGet, I am using a HttpSetProxy(2, $theproxy), and if i initiate more than one download using INetGet within the same script execution, there is up to a 15 second wait before the @InetGetBytesRead start to go up, any thoughts. Thanks.
DaleHohm Posted November 17, 2006 Posted November 17, 2006 (edited) Looks like there is something funky going on with this machine. The "remote procedure call failed" is indication of a more deeply seated problem. Quote Is there any way to trap these errors and attempt to recreate the oIE object ?Sure, that is one of the reasons that this routine exists.The COM error handler sets @error to the global constant $_IEStatus_ComError and you'll find $IEComErrorScriptline and all the others in the console message defined as variables you can examine.You can also check isObj($oIE)DaleEdit: Note that you can also write your own COM error handler and register it with _IEErrorHandlerRegister (see the helpfile) and you can then take other actions there. Edited November 17, 2006 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now