[python-win32] Getting window title

Jens B. Jorgensen jens.jorgensen@tallan.com
Sat, 27 Apr 2002 11:39:04 -0500


I'm guessing it's because the owner of the clipboard is the text box or 
whatever where the data actually is. If you want to get the text of the 
window enclosing it you'll need to navigate up to that parent window.

k s wrote:

>hi,
>  i have a python script which starts word and internet 
>explorer using COM. i also have a clipboard monitoring script. 
>i am able to get the handle to the current owner of the 
>clipboard, but using that i am not able to get the window title
>(i tried using GetWindowText() method). the window title which 
>is returned is a null string. 
> my piece of code looke something like this.
>
>def GetClipboardOwnerByName():
>    hwnd = win32clipboard.GetClipboardOwner()
>    title = win32gui.GetWindowText(hwnd)
>    print title  
>    return title
>
>any suggestions??
>
>thank you
>
>karthik
>
>________________________________________________
>Get your own "800" number
>Voicemail, fax, email, and a lot more
>http://www.ureach.com/reg/tag
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>
>  
>


-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com