简单稳定的微信PC版4.1自动化工具,基于pyautogui前台操作,确保消息送达。
- ✅ 发送消息给好友/群
- ✅ @所有人
- ✅ 群发消息
- ✅ 读取聊天列表
- ✅ 读取通讯录
- ✅ 消息监听自动回复(待完善)
pip install wxauto41或从源码安装:
git clone https://github.com/yourusername/wxauto41.git
cd wxauto41
pip install -r requirements.txt- Python 3.8+
- pyautogui
- pywin32
- pywinauto
from wxauto41 import WeChat
wx = WeChat()
# 发送给好友
wx.SendMsg('你好', '文件传输助手')
# 发送给群
wx.SendMsg('大家好', '理想')
# @所有人
wx.AtAll('开会啦', 'ideals、理想')targets = ['文件传输助手', '理想', 'ideals']
wx.Broadcast('群发测试', targets)chats = wx.GetChatList()
for chat in chats:
print(f"{chat['name']}: {chat['last_msg']}")- 微信窗口必须可见 - 本库使用前台模拟操作
- 不要移动鼠标 - 发送过程中避免干扰
- 微信4.1版本 - 仅支持Windows版微信4.1.x
- 基于pyautogui模拟人工操作
- Ctrl+F搜索联系人
- Ctrl+V粘贴消息
- Enter发送
本工具仅供学习研究使用,请遵守微信用户协议和相关法律法规。
MIT License