Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when using oIE.Document property
Message
From
24/02/2004 16:11:55
 
 
To
24/02/2004 15:31:59
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00880444
Message ID:
00880476
Views:
39
The ReadyState property needs to come from the oIE object itself. Until the site is found and displayed, the Document.ReadySState is not available.

Try this.
oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("http://office.microsoft.com/assistance/2002/articles/crabby_columns.aspx")

*-- Sleep keeps the CPU from being pounded on while waiting for the page to render.
DECLARE Sleep IN kernel32 INTEGER millisec

lnStartinSecs = SECONDS()
Sleep(50)
DO WHILE .T.
	DOEVENTS 
	DO CASE
		CASE oIE.readyState=4 AND NOT oIE.busy
			EXIT
		CASE oIE.readyState=3 AND SECONDS()-lnStartInSecs > 5
			EXIT
		CASE SECONDS()-lnStartInSecs > 30
			EXIT
	ENDCASE
	Sleep(50)
ENDDO
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform