Jump to content
Sign in to follow this  
Gillboss

_IELoadWaitTimeout

Recommended Posts

Gillboss

how this function know to which IECreat load wait?

i mean, _IELoadWait() is:

_IELoadWait($oIE)

so where to insert $oIE in _IELoadWaitTimeout() ?

thanks

Share this post


Link to post
Share on other sites
PsaltyDS

how this function know to which IECreat load wait?

i mean, _IELoadWait() is:

_IELoadWait($oIE)

so where to insert $oIE in _IELoadWaitTimeout() ?

thanks

You don't. The function _IELoadWaitTimeout($iInt) changes a single Global variable that is applied to all uses of _IELoadWait() in that run-time environment. The default value is set near the top of the IE.au3 UDF:
Global $__IELoadWaitTimeout = 300000; 5 Minutes

:mellow:


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
Gillboss

You don't. The function _IELoadWaitTimeout($iInt) changes a single Global variable that is applied to all uses of _IELoadWait() in that run-time environment. The default value is set near the top of the IE.au3 UDF:

Global $__IELoadWaitTimeout = 300000; 5 Minutes

:mellow:

i need example.. i try did it:

#RequireAdmin; because vista
#include <IE.au3>
$oIE = _IECreate("www.fxp.co.il")
$iCurrentTimeout = _IELoadWaitTimeout (500)
MsgBox(0,"","Load Wait Over")

but, its not waiting half second.. :S

Share this post


Link to post
Share on other sites
PsaltyDS

i need example.. i try did it:

#RequireAdmin; because vista
#include <IE.au3>
$oIE = _IECreate("www.fxp.co.il")
$iCurrentTimeout = _IELoadWaitTimeout (500)
MsgBox(0,"","Load Wait Over")

but, its not waiting half second.. :S

Not sure what you mean by "not waiting half second"? Did the page load faster than that (perhaps from cache)? How long did it take to load and how long do think it "waited"? Are you saying it should have timed out faster than it did, or seemed to time out too fast?

:mellow:


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
Gillboss

Not sure what you mean by "not waiting half second"? Did the page load faster than that (perhaps from cache)? How long did it take to load and how long do think it "waited"? Are you saying it should have timed out faster than it did, or seemed to time out too fast?

:mellow:

i want make it to wait half second maximum...

Share this post


Link to post
Share on other sites
Gillboss

ok, i need some script that waiting for loading some website.

but i want limit the waiting, when 1 minute pass, and website still not loaded, script are exit or somthing..

now understand?

Share this post


Link to post
Share on other sites
PsaltyDS

i want make it to wait half second maximum...

I think it does, though the total time might be more based on how long it takes for the IE browser to be created and get to the point where it is waiting to for the page to load. The function _IECreate() opens the brower, then calls _IENavigate() internally to load the URL you gave it, which in turn calls _IELoadWait(). I think _IELoadWait() is waiting 500msec as expected but it is taking longer than that to get to point where it starts watching for the timeout.

When I run this it takes almost seven seconds before the timeout comes up:

#include <IE.au3>

_IELoadWaitTimeout(500)

$iTimer = TimerInit()
$oIE = _IECreate("http://www.nonexistent.site.com")
$iErrSav = @error
$iTimer = Round(TimerDiff($iTimer) / 1000, 3)

MsgBox(64, "Done", "Finished in " & $iTimer & "sec, @error = " & $iErrSav)

The extra six and a half seconds or so was all before _IELoadWait() finally got called.

:mellow:


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
DaleHohm

i need example.. i try did it:

#RequireAdmin; because vista
#include <IE.au3>
$oIE = _IECreate("www.fxp.co.il")
$iCurrentTimeout = _IELoadWaitTimeout (500)
MsgBox(0,"","Load Wait Over")

but, its not waiting half second.. :S

Just put _IELoadWaitTimeout before _IECreate (as PsaltyDS did in his example).

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
Gillboss

thanks the example helped me =]

i thnk this exmaple should be in the help files..

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  

×