Jump to content

Waiting for IE page to load... with a twist


 Share

Recommended Posts

Hi everyone!

Okay.. I have an autoit script that is supposed to click links on a webpage (this is done by mousemove commands, mouseclickdrag, and send) keypresses.

Currently, I'm using the sleep command (5000), which means that I am giving enough time for a page to load before the script continues.

I believe that there is an include called IE.au3 that allows autoit to wait for a page to load before proceeding. But as far as I can see, this can only be done if you're waiting for a single page to load, without doing any more navigation.

Any ideas on how I could use that function so that it waits for internet explorer to load any page, regardless of whether it has navigated away from the inital page it was at?

Thanks guys!

Link to comment
Share on other sites

There is a function in IE.au3 called _IELinkClickByText that will wait for a page load to complete or any page (by default, but this can be overridden).

_IENavigate waits by default as many other functions do and you can also call _IELoadWait any time you want to.

Check out the examples in the helpfile.

Dale

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

Link to comment
Share on other sites

Please work through the examples in the helpfile - a lot of work went into them and they all run as stand-alone scripts. Please run them and play with modifying them - I promise you'll learn a lot. Start with the functions I mentioned above.

Dale

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

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...