Sign in to follow this  
Followers 0
sunburn

Need ideas to help with partial loaded IE pages

5 posts in this topic

Hi don't need a quick fix, but I am for advice on commands that might work on approaching a problem. A good response would be just references to commands or an approach that does or does not work so I can think on it (a piece of code that someone has seen useful might aid as well). I'll do the research and give it a shot, but . . . heres the problem

When I'm loading a web page from my company site, I need to wait for the page to load. Unfortunately, my ISP (or thiers) is uncooperative (I'm saying it politely). So what happens 50% of the time is I have to wait 30 seconds or so, then give up back page and resubmit (or even start all over). I've tried a couple of approaches but it is still hit or miss if I can get my script to acknowledge a good page load, and resubmit if necessary. I've been playing with winwait, _ieaction, and the sleep command, but have been having sporatic results. Any ideas on the approach are greatly appreciated.

This is my first project with autoit so please excuse my ignorance as I'm 15 years out of my last programing work. Back then it was fortran and pascal, so don't age discriminate to much, just tell me where I can educate myself :D

sunburn

Share this post


Link to post
Share on other sites

Maybe _IELoadWait()???

Straight from help

; *******************************************************
; Example 1 - Open the AutoIt forum page, tab to the "View new posts"
;               link and activate the link with the enter key.
;               Then wait for the page load to complete before moving on.
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("http://www.autoitscript.com/forum/index.php")
Send("{TAB 12}")
Send("{ENTER}")
_IELoadWait ($oIE)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I played with Loadwait, but was thinking that it would just lock up. Remember the problem is the website doesn't always fully load (just keeps working). Can you put a time restraint on loadwait so that after so many seconds..... it does something else? Example after 30 seconds and and unsucessful load, goes to a specific webpag and or refresh? and how do you script a successful load if Loadwait is unusable?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

There are a couple of choices... _IELoadWait will wait 5 minutes before giving up and returning a timeout. You can change this value with _IELoadWaitTimeout... so, set it to 30 seconds or something and then reload the page if the status is a timeout. You can also set $f_wait parameter to False and then monitor the page state yourself with _IEPropertyGet($oIE, "readystate").

Dale

Edit:Typo

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Excellent, I knew there was an easy approach.

Thanks again. Now on to ponder then next part of the problem

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