[IronPython] Users Digest, Vol 72, Issue 74
Lacko Roman
rlacko at gratex.com
Fri Jul 30 09:27:13 CEST 2010
Yes, but this will not solve the problem, it still fails with error: "object <doc> has no property <title>"
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Dickson, Madison J
> Sent: Thursday, July 29, 2010 8:00 PM
> To: users at lists.ironpython.com
> Subject: Re: [IronPython] Users Digest, Vol 72, Issue 74
>
> are you missing the "ie = w"
>
> in the first example?
>
> ________________________________________
> From: users-bounces at lists.ironpython.com [users-
> bounces at lists.ironpython.com] On Behalf Of users-
> request at lists.ironpython.com [users-request at lists.ironpython.com]
> Sent: Wednesday, July 28, 2010 4:09 PM
> To: users at lists.ironpython.com
> Subject: Users Digest, Vol 72, Issue 74
>
> Send Users mailing list submissions to
> users at lists.ironpython.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> or, via email, send a message with subject or body 'help' to
> users-request at lists.ironpython.com
>
> You can reach the person managing the list at
> users-owner at lists.ironpython.com
>
> When replying, please edit your Subject line so it is more specific than "Re:
> Contents of Users digest..."
>
>
> Today's Topics:
>
> 1. Shell.Application.Windows (Lacko Roman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 28 Jul 2010 17:21:15 +0200
> From: Lacko Roman <rlacko at gratex.com>
> To: "users at lists.ironpython.com" <users at lists.ironpython.com>
> Subject: [IronPython] Shell.Application.Windows
> Message-ID:
>
> <A76E2EE7BA21494FB90249F8809C28B9A89CEC66E8 at MBX.hq.gratex.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> I have problem with following code, where call to [doc.title] failes:
>
> # GET ALL INTERNET EXPLORER WINDOWS
> app =
> System.Activator.CreateInstance(System.Type.GetTypeFromProgID("Shell.A
> pplication"))
> for w in app.Windows():
> try:
> print w.Type()
> # CHECK IF THIS WINDOW HOLDS HTML
> if (w.Type() == "HTML Document"):
> doc = ie.document
> # THIS WILL FAIL WITH "object <doc> has no property <title>"
> print doc.title
> break
> except Exception, e:
> print e
>
> All I want is to get specific internet explorer window and get some info from
> the document
>
> This code is working in Cpython with win32com:
>
> app = win32com.client.Dispatch("Shell.Application")
> for w in app.Windows():
> try:
> print w.Type
> if (w.Type == "HTML Document"):
> ie = w
> doc = ie.document
> print doc.title
> break
> except Exception, e:
> print e
>
> Thanks in advance
>
> -Roman
>
>
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> End of Users Digest, Vol 72, Issue 74
> *************************************
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list