Jump to content

IE Crashing


Hapla
 Share

Recommended Posts

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

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
Link to comment
Share on other sites

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
Link to comment
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.

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...