sherkas Posted January 25, 2008 Share Posted January 25, 2008 When you have a script navigating or doing any IE commands on a IE window that ends up getting that data error (When you have a page with input boxes and it refreshes, it gives you an IE error dialog box). Does anyone have some work arounds with it or ways to deal with it without using mouseclicks on a X/y coord? I cant seem to close the IE window or find a way to get rid of it. The problem is once it comes up, it doesn't accept any _IE funcs, and then it wont get closed by any kill process functions either. So how do I click ok or cancel on it or get rid of it or prevent it?? Im stuck on this one.... Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 WinExists () ControlClick ()? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
sherkas Posted January 25, 2008 Author Share Posted January 25, 2008 (edited) I want to try that, but Im unsure how to proceed. Here is what the autoit window summary shows: (The IE window goes blank, and shows a dialog box that has 'Retry' Or 'Cancel' as options. If you manually use your mouse and click on the IE in the tray, it brings the IE up but you can only click on the dialog box. For the IE window: >>>> Window <<<< Title: Blank Page - Windows Internet Explorer Class: IEFrame Position: -4, -4 Size: 1288, 940 Style: 0x1DCF0000 ExStyle: 0x00000100 Handle: 0x000C0850 >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 ID: Text: Position: 0, 85 Size: 1280, 808 ControlClick Coords: 622, 218 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00080800 >>>> Mouse <<<< Position: 622, 322 Cursor ID: 2 Color: BGR: 0xFFFFFF >>>> StatusBar <<<< 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: Internet >>>> Visible Text <<<< Command Bar Favorites Command Bar Navigation Bar Page Control Live Search Search Control Blank Page - Windows Internet Explorer Zoom Level ITBarHost Menu Bar >>>> Hidden Text <<<< Live Search For the dialog box: >>>> Window <<<< Title: Windows Internet Explorer Class: #32770 Position: 456, 405 Size: 374, 165 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x0041051C >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 ID: 4 Text: &Retry Position: 107, 106 Size: 75, 23 ControlClick Coords: 25, 7 Style: 0x50030001 ExStyle: 0x00000004 Handle: 0x002C0450 >>>> Mouse <<<< Position: 591, 540 Cursor ID: 2 Color: BGR: 0x000000 >>>> StatusBar <<<< >>>> Visible Text <<<< &Retry Cancel To display the webpage again, Internet Explorer needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again. >>>> Hidden Text <<<< So, at the point I get this error, I have the browser in a handle already, however as it shows the error is a different handle. So how would I get that error window incase they have several IE windows open? Heres my logic, let me know if its good (will work on this tonight code wise and see if its works) 1. Detect when error pops up (done) 2. Get a list of all window handles (need help on that) 3. Check each window for the error text control. 4. If so, click the button control. That is how it should work right? Im having some troubles seeing a way to get a list of all windows and handles so I can check for this particular IE error box. Edited January 25, 2008 by sherkas Link to comment Share on other sites More sharing options...
sherkas Posted January 25, 2008 Author Share Posted January 25, 2008 HEres my code so far: AutoItSetOption("WinTitleMatchMode", 4) $newhandle = WinGetHandle( "Windows Internet Explorer", "&Retry" ) ControlClick("Windows Internet Explorer", "&Retry", "[ID:4]", "left", 1) It detects the windows handle but the control click is not working.... IVe tried "[Text:&Retry" and all combos but I cant seem to get this button clicked. Link to comment Share on other sites More sharing options...
shahafv Posted May 30, 2009 Share Posted May 30, 2009 Hi. I've just now got to the exact problem. After refresh IE asks to Cancel or Retry in a pop-up window. This window occurs like previously said, only when IE decides to "refresh". I'm not sure i can catch this window 100% of the time, so i thought maybe its best to cancel IE auto-refresh so this problem will not be encountered ? ( or maybe remove a security feature that asks that question... ) HEres my code so far: AutoItSetOption("WinTitleMatchMode", 4) $newhandle = WinGetHandle( "Windows Internet Explorer", "&Retry" ) ControlClick("Windows Internet Explorer", "&Retry", "[ID:4]", "left", 1) It detects the windows handle but the control click is not working.... IVe tried "[Text:&Retry" and all combos but I cant seem to get this button clicked. Link to comment Share on other sites More sharing options...
DaleHohm Posted May 30, 2009 Share Posted May 30, 2009 When you have a script navigating or doing any IE commands on a IE window that ends up getting that data error (When you have a page with input boxes and it refreshes, it gives you an IE error dialog box). Does anyone have some work arounds with it or ways to deal with it without using mouseclicks on a X/y coord? I cant seem to close the IE window or find a way to get rid of it. The problem is once it comes up, it doesn't accept any _IE funcs, and then it wont get closed by any kill process functions either. So how do I click ok or cancel on it or get rid of it or prevent it??Im stuck on this one....See exmple 2 for _IEActionDale 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...
shahafv Posted May 30, 2009 Share Posted May 30, 2009 I have found the ultimate solution. ( I hope )I dug deeper into it, and found that IE asks that question if there are forms on the page,to prevent people from accidently double buying.Winwait commands are fine, but i dont know when this refresh will happen, so i have to put winaits all around my code,to hunt this before every _IE command ( my code is travian bot, which means allot of winwaits... ).There is a solution that removes this Retry/Cancel dialog in the first place:right click my computer / advanced / error reporting / check - no reporting, only major errors.( unless one may think that this "feature" will really prevent double buying... )I'll be glad if someone finds a way to performs this automatically ( in the registry ?! ) and return the status back in the end. CiaoSee exmple 2 for _IEActionDale Link to comment Share on other sites More sharing options...
Ka36ek Posted June 20, 2009 Share Posted June 20, 2009 See exmple 2 for _IEActionDaleThat doesn't workI use Russian locale and script don't want to find characters in window (IE standard refresh dialog) Link to comment Share on other sites More sharing options...
DaleHohm Posted June 22, 2009 Share Posted June 22, 2009 That doesn't workI use Russian locale and script don't want to find characters in window (IE standard refresh dialog)The only things affected by local language in that example are the Window title text and the Button text. You should be able to adjust it for your language.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...
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