Add your description here
Project description
微信自动化工具
这是一个基于Python的微信桌面客户端自动化工具,使用uiautomation库实现对微信4.x界面的控制,可以帮助用户自动化执行微信的各种操作。
项目介绍
该工具通过UI自动化技术控制微信桌面客户端4.x,实现以下功能:
- 自动发送文本消息
- 获取聊天记录
该工具适用于需要自动化处理微信消息、批量操作或监控微信的场景,如自动客服、消息监控、自动回复等。
安装指南
前提条件
- Python 3.13+
- 微信桌面客户端4.x版本(不可以使用4.0.6+,包括4.0.6)
- Windows操作系统
安装步骤
使用pip(可能要使用官方源)
pip install wx4
- 确保微信桌面客户端已安装并能正常登录
使用示例
初始化微信控制
from wx4.wx4 import WeChat
# 创建微信控制实例
wx = WeChat()
发送消息
# 发送消息到当前聊天窗口
wx.SendMsg("你好,这是一条自动发送的消息")
获取消息
# 获取当前聊天窗口的所有消息
messages = wx.GetAllMessage()
for msg in messages:
print(f"发送者: {msg.sender}, 内容: {msg.content}")
# 更新消息(没有将无法获取)
wx.get_new_message()
主要类
WeChat: 微信控制的主类,提供各种微信操作的方法MSG: 表示一条微信消息,包含发送者、内容和索引信息
注意事项
- 使用前请确保微信已登录
- 部分功能可能受微信版本更新影响
- 使用自动化工具时请遵守微信的使用条款,如果出现任何问题与作者无关
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wx4-0.1.0.tar.gz
(9.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
wx4-0.1.0-py3-none-any.whl
(9.2 kB
view details)
File details
Details for the file wx4-0.1.0.tar.gz.
File metadata
- Download URL: wx4-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44aeea995a64db74b845f3a8cb692a9441142caaf41d87bd0265ef92b8ef88e3
|
|
| MD5 |
ddf97004b1daf4fa4660865aa17317bc
|
|
| BLAKE2b-256 |
9275fa39291626fc0b8a3fd298111538afa80ef31c8356ad3aa16acac2121dd3
|
File details
Details for the file wx4-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wx4-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
749da31261e4e4b1ad361f2e5fd11f256b6192601a98ff9e70d1a8d741e40503
|
|
| MD5 |
3a1991ee193dc0c117978d04c4447e50
|
|
| BLAKE2b-256 |
250bf41a1b5d1c524d05ab22f438ea1882d7f800c402f38a4fa32e83d846f9c2
|