I want to read text labels from another program, with Python. I think I have to use WM_GETTEXT, but I don\'t know how and I couldn\'t find anything on the internet. My program g
win32gui.PyMakeBuffer has been deprecated. Also, buffer is a builtin function, so don't use it as a variable name.
win32gui.PyMakeBuffer
buffer
Instead, just do this:
buf = " " * 255 length = win32gui.SendMessage(control, win32con.WM_GETTEXT, 255, buf) result = buf[:length]