Sign in to follow this  
Followers 0
Hapla

IE Crashing

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by MrMitchell

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Ok, thank you that will help. Script :

#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 by Hapla

Share this post


Link to post
Share on other sites

P.S About 2 last func how can i attach IE window by different way

maybe _IeCreateEmbedded and then just Hide or Show the GUI you create for the page.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

_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 ! Posted Image

( may be your pc is full of dust and is hot ? )


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0