mistermassacre 0 Posted December 9, 2010 (edited) The script:#include <IE.au3> _IEErrorHandlerRegister() $oIE = _IEAttach("http://www.google.com", "URL") $oFrame = _IEFrameGetObjByName($oIE, "frame_that_doesnt_exist") MsgBox("","",@error)If I have an explorer window open to the google front page and I run this script then I can see the @error being set to 7 (no frames found) which is just as expected.However if I block google so the page wont load (for example if I setup IE6 to use a nonexistent proxy server), refresh explorer (gettingThe page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings page) and run the script it generates the following:>Running:(3.3.6.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\Dev\DASC\test.au3" --> COM Error Encountered in test.au3 ----> $IEComErrorScriptline = 713 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Access is denied. ----> $IEComErrorDescription = Access is denied. ----> $IEComErrorSource = ----> $IEComErrorHelpFile = C:\WINDOWS\system32\Mshtml.hlp ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> COM Error Encountered in test.au3 ----> $IEComErrorScriptline = 2214 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Access is denied. ----> $IEComErrorDescription = Access is denied. ----> $IEComErrorSource = ----> $IEComErrorHelpFile = C:\WINDOWS\system32\Mshtml.hlp ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 C:\Program Files\AutoIt3\Include\IE.au3 (2257) : ==> Object referenced outside a "With" statement.: Return SetError($_IEStatus_Success, $oTemp.GetElementsByTagName($s_TagName).length, $oTemp.GetElementsByTagName($s_TagName)) Return SetError($_IEStatus_Success, $oTemp.GetElementsByTagName($s_TagName)^ ERROR ->15:28:33 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 1.761I am completely mystified as to why this script generates a fatal error when trying to find a frame on a web page if that page is unavailable, am I missing something? Edited December 9, 2010 by mistermassacre Share this post Link to post Share on other sites
mistermassacre 0 Posted December 9, 2010 I've tried the same thing using _IEGetFrameCollection($oIE, 1) instead of _IEFrameGetObjByName($oIE, "frame_that_doesnt_exist") and I get the proper @error code, the problem seems exclusive to _IEFrameGetObjByName. Share this post Link to post Share on other sites
DaleHohm 65 Posted December 9, 2010 Ah, you caught me making a mistake I correct here in the forum all of the time... Line 800 is currently If $oFrame.name = $s_Name Then Return SetError($_IEStatus_Success, 0, $oTemp.frames($s_Name)) and needs to be If String($oFrame.name) = $s_Name Then Return SetError($_IEStatus_Success, 0, $oTemp.frames($s_Name)) You can update your copy if you like for now and I'll get the fix in the pipeline. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites
mistermassacre 0 Posted December 9, 2010 I've made the change, thanks! Share this post Link to post Share on other sites