Hapla Posted January 26, 2011 Share Posted January 26, 2011 My script working in ie well but IE crash for about 2 hours working script and i get this : --> IE.au3 V2.4-0 Warning from function _IELoadWait, $_IEStatus_LoadWaitTimeout D:\Program Files\AutoIt3\Include\IE.au3 (2214) : ==> The requested action with this object has failed.: Return SetError($_IEStatus_Success, 0, $o_object.document) Return SetError($_IEStatus_Success, 0, $o_object.document^ ERROR I think its something about IE not script becouse IE is crashing, how can i solve this? Link to comment Share on other sites More sharing options...
MrMitchell Posted January 26, 2011 Share Posted January 26, 2011 (edited) Add an error handler to catch obj errors. This should at least help keep the script from crashing, it would instead just report the errors either in console or msgbox or however you set it up. Look up _IEErrorHandlerRegister(). Then, fix whatever in your script is causing IE to crash. If you post your script (not just the console output), that could help us help you figure out why IE crashes. Edited January 26, 2011 by MrMitchell Link to comment Share on other sites More sharing options...
Hapla Posted January 26, 2011 Author Share Posted January 26, 2011 (edited) Ok, thank you that will help. Script : expandcollapse popup#include <IE.au3> HotKeySet("{PAUSE}", "hank") HotKeySet("{F10}", "ukryj") HotKeySet("{F11}", "pokaz") $oIE = _IECreate ("www.nk.pl") $hapla = FileOpen("h2.txt", 0) $gengar = FileOpen("last.txt", 1) $i_delay = 30000 $i_timeout = 300000 If $hapla = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf While 1 $line = FileReadLine($hapla) If @error = -1 Then ExitLoop _IENavigate ($oIE, $line) _IELoadWait ($oIE, $i_delay = 30000, $i_timeout = 300000) _IEAction ($oIE, "refresh") sleep(5000) _IEFormImageClick ($oIE, "Dodaj do listy znajomych", "alt") Wend FileClose($hapla) FileClose($gengar) Func hank() MsgBox(1, "End", "Saving last used line into file last.txt" & $line) FileWriteLine($gengar, $line) Exit EndFunc Func ukryj() WinSetState("nk.pl", "", @SW_HIDE) EndFunc Func pokaz() WinSetState("nk.pl" , "", @SW_SHOW) EndFunc I noticed that for about 1-2 hours script running IE run very slowly, and after more slowly I added delay and timeout to stop crashing script and I think it helps now P.S About 2 last func how can i attach IE window by different way coz I tried typing there Internet Explorer and other similar, but no effect Edited January 26, 2011 by Hapla Link to comment Share on other sites More sharing options...
iamtheky Posted January 26, 2011 Share Posted January 26, 2011 P.S About 2 last func how can i attach IE window by different waymaybe _IeCreateEmbedded and then just Hide or Show the GUI you create for the page. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
wakillon Posted January 27, 2011 Share Posted January 27, 2011 _IELoadWait ($oIE, $i_delay = 30000, $i_timeout = 300000)It's a huge timeout !Try to empty IE cache, and see if that does a diiference ! ( may be your pc is full of dust and is hot ? ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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