namauto Posted August 26, 2008 Posted August 26, 2008 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?
Bert Posted August 26, 2008 Posted August 26, 2008 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)). The Vollatran project My blog: http://www.vollysinterestingshit.com/
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