Exact Posted November 27, 2009 Share Posted November 27, 2009 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? Link to comment Share on other sites More sharing options...
Developers Jos Posted November 27, 2009 Developers Share Posted November 27, 2009 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]]]]] ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Exact Posted November 27, 2009 Author Share Posted November 27, 2009 (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 November 27, 2009 by Exact Link to comment Share on other sites More sharing options...
Developers Jos Posted November 27, 2009 Developers Share Posted November 27, 2009 can't you just use _IELoadWaitTimeOut() and _IELoadWait() to accomplish that? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Exact Posted November 27, 2009 Author Share Posted November 27, 2009 can't you just use _IELoadWaitTimeOut() and _IELoadWait() to accomplish that?Cant figure it out how it work. Can you help me? Link to comment Share on other sites More sharing options...
Developers Jos Posted November 27, 2009 Developers Share Posted November 27, 2009 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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Exact Posted November 27, 2009 Author Share Posted November 27, 2009 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 Link to comment Share on other sites More sharing options...
DaleHohm Posted November 27, 2009 Share Posted November 27, 2009 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now