[Tutor] WIn32 extension -= exposing methods with a windows handle
Mike Meisner
mikem at blazenetme.net
Sat Jun 21 18:47:22 CEST 2008
I would like to capture information from a multi-player internet game in order to tabulate player statistics. Specifically, I need information from a chat box within the main play window.
Using the win32 extension (win32gui module: EnumWindows, EnumChildWIndows) I can obtain a handle to the chat box. At that point, I don't see any apparent win32 functions to expose the methods available in the chat box and, thereby, extract the chat text information I need.
So, if I have the handle to a child window, does anyone know how to enumerate the attributes and methods for that window using Python or its extensions? (Since the window is not a Python generated window, __dict__ doesn't work, or I am incorrectly using it: w = CreateWindowFromHandle(hwnd); print w.__dict__). Also, if I know that a particular method is supported by the window's class (e.g., GetText), can I use the window's handle to access the method (i.e., text = hwnd.GetText) ? Or, what is the correct syntax?
Thanks for your help.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080621/baff312b/attachment.htm>
More information about the Tutor
mailing list