Skip to content

dagangtj/wxauto41

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wxauto41 - 微信4.1自动化库

简单稳定的微信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']}")

注意事项

  1. 微信窗口必须可见 - 本库使用前台模拟操作
  2. 不要移动鼠标 - 发送过程中避免干扰
  3. 微信4.1版本 - 仅支持Windows版微信4.1.x

技术原理

  • 基于pyautogui模拟人工操作
  • Ctrl+F搜索联系人
  • Ctrl+V粘贴消息
  • Enter发送

免责声明

本工具仅供学习研究使用,请遵守微信用户协议和相关法律法规。

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages