COM automation, Internet Explorer, DocumentComplete event

Roger Upole rupole at hotmail.com
Tue Jan 10 17:55:52 EST 2006


PythonCom interfaces implement __cmp__ so that you can just use
a straight == comparison.

    hth
         Roger

"puff" <rbell01824 at earthlink.net> wrote in message news:1136923783.403261.188890 at g14g2000cwa.googlegroups.com...
> I'm very new to Python and have a question concerning IE automation and
> detection of page completion.
>
> The MSDN article 180366 states in part:
>
> ----
> The top-level frame fires the DocumentComplete in the end. So, to check
> if a page is done downloading, you need to check if the IDispatch*
> parameter is same as the IDispatch of the WebBrowser control.
>
> For Visual Basic, here is code that performs this check:
>
> Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object,
>                                         URL As Variant)
>   If (pDisp Is WebBrowser1.Object) Then
>      Debug.Print "Web document is finished downloading"
>   End If
> End Sub
> ----
>
> I'm able to catch IE's events including DocumentComplete with:
>
>    def OnDocumentComplete(self, pDisp, URL):
>
> so i have pDisp.  Self is the object returned by:
>
>        self.ie = DispatchWithEvents("InternetExplorer.Application",
> InternetExplorerEvents)
>
> that created the automation object.  How do I perform the test in
> Python?
>
> Thanks for any help.
> 




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



More information about the Python-list mailing list