本帖最后由 louxinghao 于 2021-9-7 17:44 编辑
由于这边每次修改内容需要审核,wxauto 代码更新到了 github: https://github.com/cluic/wxauto
更新日志
2021-08-29 更新发送文件方法 SendFilesfrom wxauto import *
wx = WeChat()
# 向某人发送文件(以`文件传输助手`为例,发送三个不同类型文件)
file1 = 'D:/test/wxauto.py'
file2 = 'D:/test/pic.png'
file3 = 'D:/test/files.rar'
who = '文件传输助手'
wx.ChatWith(who) # 打开`文件传输助手`聊天窗口
wx.SendFiles(file1, file2, file3) # 向`文件传输助手`发送上述三个文件
2021-09-05 更新发送文件方法 SendScreenshotfrom wxauto import *
wx = WeChat()
# 向某人发送程序截图(以`文件传输助手`为例,发送微信截图)
name = '微信'
classname = 'WeChatMainWndForPC'
wx.ChatWith(who) # 打开`文件传输助手`聊天窗口
wx.SendScreenshot(name, classname) # 发送微信窗口的截图给文件传输助手
2021-09-06 修复发送文件BUG
注:为保证发送文件稳定性,首次发送文件可能花费时间较长,后续调用会缩短发送时间
2021-09-07 支持 pip 安装 |