Jump to content

Recommended Posts

Posted

I've tried doing this as both a for, and a while loop. I'm getting similar issues.

For $i = 0 to 5 Step +1
        _IELoadWait($o_page)
        $refresh = _IEAction($o_page, "refresh")
    Next

That's how I did it in the For loop. now sometimes the page is refreshing 6 times, and sometimes it's refreshing 7 times, without any changes in the script between runs.

Any idea as to the cause of this?

Posted

Add a sleep(10) in the loop and see what happens. Not sure why it is happening, but the sleep may make it more stable.

This is from the helpfile, and it may be the reason why it is happening:

Browser scripting security restrictions may sometimes prevent _IELoadWait from guaranteeing that a page is fully loaded and can occasionally result in untrapped errors. In these cases you may need to avoid calling _IELoadWait and attempt to employ other methods of insuring that the page load has completed. These methods might include using a Sleep command, examining browser status bar text and other methods. When using functions that call _IELoadWait for objects other than the InternetExplorer (browser) object, you may also be successful by calling _IELoadWait for the browser yourself (e.g. _IELoadWait($oIE)).

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
  • Recently Browsing   0 members

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