Jump to content
Sign in to follow this  

_IELoadWait and _IEDocWriteHTML

Recommended Posts

Hi there,

So my program navigates to a certain website using _IENavigate. But then, once the page is loaded, I use _IEDocWriteHTML with some StringReplaces to change the HTML code a bit.

But, my code add's an image to the HTML (this will take a while before loaded), but using _IELoadWait doesn't work when you modify the HTML. My script has to wait untill the image is loaded.

Is there any way to make my script wait? I've thought of downloading the page to a local file, modify it, then open it and use _IELoadWait (that should work I guess) but then this is quite messy and was looking for a smarter / cleaner solution.


Share this post

Link to post
Share on other sites

Try checking the .complete property of the image element:

#include <IE.au3>

$oIE = _IE_Example("Form")
$oImage = _IEGetObjByName($oIE, "imageExample")
ConsoleWrite(".complete = " & $oImage.complete & @LF)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...