toni4 Posted June 21, 2010 Share Posted June 21, 2010 I tried this: $oIEL = _IECreate ($gLink,0,$visible) ... _IENavigate($oIEL, $Link) _IELoadWait ($oIEL) $body = _IEDocReadHTML ($oIEL) It's work fine until IE open dialog for resending information. I get this output: C:\Program Files\AutoIt3\Include\IE.au3 (2021) : ==> Variable must be of type "Object".: Return SetError($_IEStatus_Success, 0, $o_object.document.documentElement.outerHTML) Return SetError($_IEStatus_Success, 0, $o_object.document.documentElement^ ERROR Error is in function _IEDocReadHTML. I need help to code function to send Retry command to dialog box of IE ($oIEL) Link to comment Share on other sites More sharing options...
Juvigy Posted June 21, 2010 Share Posted June 21, 2010 Post the whole code. This part works great for me: $oIEL = _IECreate ("google.com") _IENavigate($oIEL,"yahoo.com") _IELoadWait ($oIEL) $body = _IEDocReadHTML ($oIEL) Link to comment Share on other sites More sharing options...
toni4 Posted June 21, 2010 Author Share Posted June 21, 2010 Whole code have more then 1500 lines. Sometimes it work for few days and sometime only several minutes, before I get error (and dialog box for refreshing page from IE). I need code to catch dialog box from Windows Internet Explorer (pointed with $oIEL) and send Retry command. I find similar topic: http://www.autoitscript.com/forum/index.php?showtopic=62612. Link to comment Share on other sites More sharing options...
Juvigy Posted June 21, 2010 Share Posted June 21, 2010 I see- you get the IE refresh OK-Cancel pop -up. On the link you mentioned there is a solution (maybe even 2 - at least _IEAction second example works for sure) . Link to comment Share on other sites More sharing options...
toni4 Posted June 21, 2010 Author Share Posted June 21, 2010 I tried _IEAction second example but it's not work. ; ******************************************************* ; Example 2 - Same as Example 1, except instead of using click, give the element focus ; and then use ControlSend to send Enter. Use this technique when the ; browser-side scripting associated with a click action prevents control ; from being automatically returned to your code. ; ******************************************************* ; #include <IE.au3> $oIE = _IE_Example ("form") $oSubmit = _IEGetObjByName ($oIE, "submitExample") $hwnd = _IEPropertyGet($oIE, "hwnd") _IEAction ($oSubmit, "focus") ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") ; Wait for Alert window, then click on OK WinWait("Windows Internet Explorer", "ExampleFormSubmitted") ControlClick("Windows Internet Explorer", "ExampleFormSubmitted", "[CLASS:Button; TEXT:OK; Instance:1;]") _IELoadWait ($oIE) I get Alert window but script never click OK. Link to comment Share on other sites More sharing options...
Juvigy Posted June 21, 2010 Share Posted June 21, 2010 Some of the strings may be different - examine the pop-up with the autoit window info tool to check. 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