Metadata-Version: 2.4
Name: wxautoz
Version: 0.2.2
Summary: 基于 wxauto (by cluic) 的增强版本，添加了后台调度功能
Home-page: https://github.com/laychou666/wxautoz
Author: laychou666
Author-email: laychou666 <laychou666@gmail.com>
Maintainer: laychou666
Maintainer-email: laychou666 <laychou666@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/laychou666/wxautoz
Project-URL: Bug Reports, https://github.com/laychou666/wxautoz/issues
Project-URL: Source, https://github.com/laychou666/wxautoz
Project-URL: Original Project, https://github.com/cluic/wxauto
Keywords: wechat,automation,wxauto,background
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pywin32
Requires-Dist: uiautomation
Requires-Dist: colorama
Requires-Dist: comtypes
Requires-Dist: pyperclip
Requires-Dist: psutil
Requires-Dist: Pillow
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: maintainer
Dynamic: requires-python

# wxautoz

基于 [wxauto](https://github.com/cluic/wxauto) 的增强版本，添加了后台调度功能。

## ✨ 新增功能

### 后台读取聊天记录

**最新更新 (2025.10.29)** 修复了wxautoz导入的包名错误，优化项目结构

**(2025.10.27)** 99%实现阅读指定任意联系人的聊天记录功能，主要是检索联系人功能的完成。除此之外，突出了文件信息。

**(2025.10.13)**: 成功实现后台阅读聊天记录功能

- ✅ 无需前台显示窗口即可读取消息
- ✅ 支持多种消息类型（文本、图片、文件、语音等）
- ⚠️ **限制**: 如果不是窗口显示的联系人，需要先检索联系人时，会窗口闪烁

## 📁 项目结构

```
wxautoz_project/              # 项目根目录
├── wxautoz/                  # Python 包目录
│   ├── __init__.py
│   ├── wx.py                 # 微信核心功能
│   ├── param.py              # 参数配置
│   ├── logger.py             # 日志模块
│   ├── msgs/                 # 消息处理模块
│   ├── ui/                   # UI 自动化模块
│   └── utils/                # 工具函数
├── setup.py                  # 安装配置
├── pyproject.toml            # 项目配置
├── README.md                 # 项目文档
├── LICENSE                   # 开源协议
├── requirements.txt          # 依赖列表
├── get_messages_example.py   # 示例：获取消息
└── search_example.py         # 示例：搜索联系人
```

## 🚀 快速开始

### 方法一：从 PyPI 安装（推荐）

```bash
pip install wxautoz
```

### 方法二：从源码安装

#### 前置要求
- Python 3.8+
- Windows 操作系统
- 微信客户端已安装并登录

#### 完整安装步骤

```powershell
# 1. 克隆或下载项目
git clone https://github.com/laychou666/wxautoz.git
cd wxautoz

# 2. 创建 Conda 虚拟环境（可选但推荐）
conda create -n wxautoz python=3.10 -y
conda activate wxautoz

# 3. 安装依赖并安装包（开发模式）
pip install -e .

# 4. 验证安装
python -c "import wxautoz; print(f'wxautoz {wxautoz.__version__} 安装成功！')"
```


### 运行示例程序

```bash
# 运行后台读取聊天记录测试程序
python get_messages_example.py

# 运行后台搜索任意指定联系人聊天记录测试程序
python search_example.py
```

### 代码示例

```python
import wxautoz.ui.base as base
from wxautoz import WeChat

# 启用后台模式
base.WXAUTO_BACKGROUND_MODE = True

# 初始化微信
wx = WeChat()

# 切换到目标聊天
wx.ChatWith("文件传输助手")

# 获取聊天记录
messages = wx.GetAllMessage()
```

## 📝 功能说明

### 后台模式

后台模式允许在不显示微信窗口的情况下执行操作，适用于:

- 自动化消息监控
- 定时任务处理
- 消息数据收集


## 🛠️ 开发指南

### 从现有 wxautoz 目录测试

克隆 wxautoz 代码到本地：

```powershell
# 1. 创建新的测试环境
conda create -n wxautoz_test python=3.10 -y
conda activate wxautoz_test

# 2. 进入项目目录
cd "项目目录路径"

# 3. 以开发模式安装
pip install -e .

# 4. 运行测试
python search_example.py
```


## 🔗 相关链接

- 原始项目: [wxauto](https://github.com/cluic/wxauto) by cluic
- GitHub 仓库: [wxautoz](https://github.com/laychou666/wxautoz)
- 问题反馈: [Issues](https://github.com/laychou666/wxautoz/issues)

## 📄 许可证

Apache License 2.0 - 详见 [LICENSE](LICENSE) 文件

本项目基于 [wxauto](https://github.com/cluic/wxauto) (by cluic) 进行修改和增强。

**版权声明：**
- 原始项目 wxauto: Copyright (c) 2023 cluic
- 修改版本 wxautoz: Copyright (c) 2025 laychou666

**主要修改：**
- 添加后台模式功能
- 增强消息处理能力
- 改进联系人搜索功能
- 重组项目结构

根据 Apache License 2.0 许可证，本项目保留原作者版权声明，并在此基础上进行修改和分发。

## 🙏 致谢

感谢 [cluic](https://github.com/cluic) 开发的优秀项目 [wxauto](https://github.com/cluic/wxauto)，为本项目提供了基础。
