python如何获取pc端微信好友聊天记录并发送消息?
网友回复
使用uiautomation库,安装库
pip install uiautomation
监听历史消息并实时回复微信好友消息python代码如下:
# -*- coding: utf-8 -*-
import uiautomation as auto
import time
wx_window = auto.WindowControl(Name='微信', ClassName='WeChatMainWndForPC')
auto.SendKeys(text='{Alt}{Ctrl}w') # 快捷键唤醒微信
def get_chatmsg_list() -> list | None:
name_list = list()
chat_msg_win = wx_window.ListControl(Name='消息')
if no...点击查看剩余70%


