标签:获取 hwnd end 窗口 sage ext text utf-8 rom
import win32con
from win32gui import PyMakeBuffer, SendMessage, PyGetBufferAddressAndLen, PyGetString
length = 10000
hWnd=68302
buf = PyMakeBuffer(length)
length2 = SendMessage(hWnd, win32con.WM_GETTEXT, length, buf)+1
print(length2)
buf = PyMakeBuffer(length2)
print(‘get: ‘, SendMessage(hWnd, win32con.WM_GETTEXT, length2, buf))
address, length = PyGetBufferAddressAndLen(buf)
text = PyGetString(address, length)
print(‘text: ‘, text)
标签:获取 hwnd end 窗口 sage ext text utf-8 rom
原文地址:https://www.cnblogs.com/yubs/p/10916389.html