python 通过句柄获取窗口内容,,-- enoding
python 通过句柄获取窗口内容,,-- enoding
-- enoding:utf-8 --
生成 buffer 对象
import win32con
from win32gui import PyMakeBuffer, SendMessage, PyGetBufferAddressAndLen, PyGetString
length = 10000
hWnd=68214
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)
python 通过句柄获取窗口内容
相关内容
- python读入txt数据,并转成矩阵,,txt文件的部分数据
- python处理数据库的返回数据,,上代码:import
- python写一个随机点名软件,python随机点名,最近有个随机
- Python制作有道翻译小工具,有道翻译,该工具主要是利用
- python自动化基础(参数化),自动化python,一、创建加法
- python发短信,python读取短信验证码,车牌摇号想给自己手
- python--关键字参数/可变参数--内置函数--时间模块--常用
- python3颜色输出,python输出,遇到一个项目,需求是
- python读csv格式文档并用matplotlib绘制图表,pythonmatplot,
- 如何让你的Python代码更加pythonic ?,怎样让代码高亮显
评论关闭