添加自动发送祝福语功能和坐标配置

This commit is contained in:
2026-03-03 11:05:33 +08:00
parent 415ec18182
commit 024950e9fb
10 changed files with 514 additions and 25 deletions

View File

@@ -3,6 +3,7 @@
打印PC微信通讯录的所有子控件
需要以管理员权限运行Python
"""
import os
import uiautomation as auto
import time
import ctypes
@@ -244,7 +245,7 @@ def main():
print()
# 输出文件
output_file = r"D:\夏骥\微信研究\wechat_controls_output.txt"
output_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'wechat_controls_output.txt')
# 首先尝试标准方法
print("=" * 80)
@@ -268,7 +269,7 @@ def main():
print("方式2: 使用RawViewWalker遍历控件 (包括原始控件)...")
print("=" * 80)
output_file_raw = r"D:\夏骥\微信研究\wechat_controls_raw.txt"
output_file_raw = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'wechat_controls_raw.txt')
try:
# 加载UIAutomation类型库
@@ -317,7 +318,7 @@ def main():
hwnd = wechat_window.NativeWindowHandle
output_file_win32 = r"D:\夏骥\微信研究\wechat_controls_win32.txt"
output_file_win32 = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'wechat_controls_win32.txt')
with open(output_file_win32, 'w', encoding='utf-8') as f:
f.write("=" * 80 + "\n")