Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ole Automation with IE 5
Message
From
16/08/1999 09:00:32
 
 
To
16/08/1999 02:05:33
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00253828
Message ID:
00254000
Views:
17
>>>>I'm using follwing code for automating IE 5
>>>>
>>>>oBrowser = CREATEOBJECT("InternetExplorer.Application")
>>>>oBrowser.Visible = .t.
>>>>oBrowser.Navigate("http://www.microsoft.com")
>>>>
>>>>* In-Between these lines I want to wait till microsoft.com is fully displayed, then move on to next line...
>>>>
>>>>oBrowser.Navigate("http://www.yahoo.com")
>>>>
>>>>
>>>>I'm question is how to check whether the last navigated site was completed displayed or not...
>>>>(something like If oBrowser.LastPageOk()...)
>>>>
>>>>TIA...
>>>
>>>There may be an event that tells you when navigation is complete. You can expose the IE events and hook VFP code to them by using the VFPCOM.DLL
>>
>>You can either poll Document.ReadyState, or bind a VFP method to the IE.DownloadComplete event with VFPCOM.
>
>I have not used vfpcom but as I've read here many times that we can use vfpcom to bind events, Using vfpcom whenever downloadcomplete will occur we can come to know...
>
>But can u pls clarify what is 'Poll Document.readystate'... I was not able to understand this...
>
>TIA...

Document.ReadyState is a property that changes when the download completes. By poll, I mean you can do something like

DO WHILE !oIE.Document.ReadyState = 4
ENDDO

To cause a loop while the document downloads. Note- the first method is preferrable because this causes the processor to suck up cycles while it waits.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform