This commit is contained in:
HuangHai
2026-01-26 09:15:45 +08:00
parent 6b6a32c902
commit d9bb1d1f83
17 changed files with 70 additions and 358 deletions

View File

@@ -4,6 +4,7 @@ import time
import logging
import sys
import os
import WxUtil
# 添加项目根目录到 sys.path
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -29,11 +30,8 @@ def open_chat(target_name="糖豆爸爸"):
logger.info(f"开始执行 T1: 打开微信并进入 '{target_name}' 的对话框...")
# 连接设备
try:
d = u2.connect()
logger.info(f"设备连接成功: {d.info.get('serial')}")
except Exception as e:
logger.error(f"设备连接失败: {e}")
d = WxUtil.connect_device()
if not d:
return
# 1. 启动微信