kmps Posted March 24, 2006 Posted March 24, 2006 anybody can tell me how to confirm a web page had been 100% loaded?
Lapo Posted March 24, 2006 Posted March 24, 2006 anybody can tell me how to confirm a web page had been 100% loaded?#Include <IE.au3>$s_URL = "http://www.google.com" $o_object = ObjCreate("InternetExplorer.Application") If IsObj($o_object) Then $o_object.visible = 0 $o_object.navigate ($s_URL) While _IEGetProperty($o_object, "busy") or _ ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState") <> 4)) Sleep(100) WEnd _IELoadWait($o_object) ; $o_object.visible = $f_visibleEndIf Msgbox(0,"","LOADED")$o_object.visible = 1
Bert Posted March 24, 2006 Posted March 24, 2006 I tried using the code to test something, and I get a error. $s_oname = ObjName($0_object)^ERRORError: Variable used without being declared The Vollatran project My blog: http://www.vollysinterestingshit.com/
Xenobiologist Posted March 24, 2006 Posted March 24, 2006 I tried using the code to test something, and I get a error. $s_oname = ObjName($0_object)^ERRORError: Variable used without being declaredHI,hmmh works fine for me.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Moderators big_daddy Posted March 24, 2006 Moderators Posted March 24, 2006 (edited) #Include <IE.au3> $s_URL = "http://www.google.com" $o_object = ObjCreate("InternetExplorer.Application") If IsObj($o_object) Then $o_object.visible = 0 $o_object.navigate ($s_URL) While _IEGetProperty($o_object, "busy") or _ ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState") <> 4)) Sleep(100) WEnd _IELoadWait($o_object) ; $o_object.visible = $f_visible EndIf Msgbox(0,"","LOADED") $o_object.visible = 1Why in the world would you do all that when you could just use: #Include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http:\\www.google.com") ;The script will not continue until the webpage is finished loading. MsgBox(0, "", "Finished Loading") Edited March 24, 2006 by big_daddy
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