Sign in to follow this  
Followers 0
kmps

Ie Auto Question

5 posts in this topic

anybody can tell me how to confirm a web page had been 100% loaded?

Share this post


Link to post
Share on other sites



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_visible

EndIf

Msgbox(0,"","LOADED")

$o_object.visible = 1

Share this post


Link to post
Share on other sites

I tried using the code to test something, and I get a error.

$s_oname = ObjName($0_object)

^ERROR

Error: Variable used without being declared

HI,

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 = 1

Why 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 by big_daddy

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