VeeDub Posted August 3, 2006 Share Posted August 3, 2006 Hi, Occassionally when working with a site via IE.au3, the following error occurs: C:\Program Files\AutoIt3\beta\Include\IE.au3 (2162) : ==> Variable must be of type "Object".: Return $o_object.document.body.innerHTML Return $o_object.document.body^ ERROR The issue is with the site rather than the UDF, but is there a way that I can trap this error so that my script continues rather than bombing out? thanks VW Link to comment Share on other sites More sharing options...
zfisherdrums Posted August 3, 2006 Share Posted August 3, 2006 Just a guess, but would this work? If IsObj($o_object.document.body.innerHTML) then Return $o_object.document.body.innerHTML Else SetError(1) Return 0 EndIf Let me know if this helps. Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
VeeDub Posted August 3, 2006 Author Share Posted August 3, 2006 Hi, I'm not sure how I use your code, as that error message is being returned by the IE udf. I think the answer is to use _IEErrorHandlerRegister, so that the udf returns to a function that I can configure, but I need to experiment with this to see if I am on the right track or not. Thanks VW Link to comment Share on other sites More sharing options...
VeeDub Posted August 3, 2006 Author Share Posted August 3, 2006 I think the answer is to use _IEErrorHandlerRegister, so that the udf returns to a function that I can configure.I was right about this, very useful function, in fact the whole udf is excellent. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 3, 2006 Moderators Share Posted August 3, 2006 I was right about this, very useful function, in fact the whole udf is excellent.I will second that! There is no telling how many hours Dale has spent on it. Link to comment Share on other sites More sharing options...
DaleHohm Posted August 3, 2006 Share Posted August 3, 2006 I will second that! There is no telling how many hours Dale has spent on it.Yeah, and I don't think I want to know that answer to that question, even if I could figure it out... I would like to know about the characteristic of a site where you can get this error (it is in _IEBodyReadHTML). I double-checked the code and I'm having a hard time figuring out when you could get that error... unless you are passing in another type of object altogether like a Word object, or perhaps the url is ftp: type or something?I'd like to trap for this, so if you can provide more detail I would appreciate it.Dale 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 Link to comment Share on other sites More sharing options...
VeeDub Posted August 4, 2006 Author Share Posted August 4, 2006 I would like to know about the characteristic of a site where you can get this error (it is in _IEBodyReadHTML). I double-checked the code and I'm having a hard time figuring out when you could get that error... unless you are passing in another type of object altogether like a Word object, or perhaps the url is ftp: type or something?I'd like to trap for this, so if you can provide more detail I would appreciate it.DaleOK, I will add some logging and I'll get back to you in the next day or so with a couple of sites and which function I am using when the error occurs.VW Link to comment Share on other sites More sharing options...
VeeDub Posted August 4, 2006 Author Share Posted August 4, 2006 Dale, Where could I find a full list of the variables that I could log via the ErrorHandler? I would like to log the URL and if possible the function I was calling. Thanks VW Link to comment Share on other sites More sharing options...
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