赞
踩
打开电脑版微信,界面打开处于群成员界面
通过任务管理器->详细信息查看WeChat.exe进程PID(如代码示例中6940)
- #-*-coding:utf-8-*-
-
- from pywinauto.application import Application
- app = Application(backend='uia').connect(process=6940)
- win_main_Dialog = app.window(class_name='WeChatMainWndForPC')
- chat_list = win_main_Dialog.child_window(control_type='List', title='聊天成员')
- for i in chat_list.items():
- p = i.descendants()
- if p and len(p) > 3:
- if p[3].texts():
- print(p[3].texts()[0])
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。