Sign in to follow this  
Followers 0
Exact

IE question

8 posts in this topic

If i run _IECreate I must know after 3000ms if the page is 100% loaded.

Example:

_IECreate("www.google.com")
sleep(3000)
....

How do I know if the page is fully loaded after 3000ms?

Share this post


Link to post
Share on other sites



Have you checked the helpfile for parameters?

#include <IE.au3> 
_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Have you checked the helpfile for parameters?

#include <IE.au3> 
_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )

yes but how do i know when the page is fully loaded.

I used $f_wait = 0 so it don't waits until the page is loaded.

Now i must know if the page is fully loaded after 3000ms, if this is not it must give a msg or something else.

Edited by Exact

Share this post


Link to post
Share on other sites

can't you just use _IELoadWaitTimeOut() and _IELoadWait() to accomplish that?

Cant figure it out how it work. Can you help me?

Share this post


Link to post
Share on other sites

untested but guess that should be close:

#include<ie.au3>
$h_ie= _IECreate("www.google.com")
_IELoadWait($h_ie,0,3000)
If @error then
    ConsoleWrite('-Timed out' & @crlf)
Else
    ConsoleWrite('+Loaded' & @crlf)
EndIf

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

untested but guess that should be close:

#include<ie.au3>
$h_ie= _IECreate("www.google.com")
_IELoadWait($h_ie,0,3000)
If @error then
    ConsoleWrite('-Timed out' & @crlf)
Else
    ConsoleWrite('+Loaded' & @crlf)
EndIf

Jos

Thanx i wil look tomorrow if it works, i guess it works :)

Share this post


Link to post
Share on other sites

Very close, but to use this method, you'll need to tell _IECreate not to wait so that the _IELoadWait gets a chance...

$h_ie= _IECreate("www.google.com", 0, 1, 0)

Alternately, you can use

_IELoadWaitTimeout (3000) ; set default timeout to 3 sec
$h_ie= _IECreate("www.google.com")
If @error = $_IEStatus_LoadWaitTimeout Then ; aka 6
    ConsoleWrite('-Timed out' & @crlf)
Else
    ConsoleWrite('+Loaded' & @crlf)
EndIf

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

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