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.1.tar.gz
(9.3 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.1-py3-none-any.whl
(9.2 kB
view details)
File details
Details for the file wx4-0.1.1.tar.gz.
File metadata
- Download URL: wx4-0.1.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2c89b856738213a723d93ceb547339929e1f9f57e13f52679f0d800166bbba1
|
|
| MD5 |
347a09040332a7243edd84d1671f5129
|
|
| BLAKE2b-256 |
bdba3a20c2c84392bf27bef0b4c93d7a11d07e1eaf47a707704025a46be8031f
|
File details
Details for the file wx4-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wx4-0.1.1-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 |
e352609e02c3b7825f59b5248561845a73ab95aabcd8e91f5cf6fbd7145eac54
|
|
| MD5 |
5b3498818e52bc7bdfe5c4c9d69b81c0
|
|
| BLAKE2b-256 |
a7dcfbf94b30b41379dd14ae6a06dff2f2bf0bc803e40a9bd60510834a03eadf
|