项目介绍:
针对某些微信消息自动回复场景,优化了Python 自动化回复信息功能,不仅限于固定回复某个人的消息,而是自动查找未读消息进行自动化回复,此方案是运行在桌面软件层,对微信封号无影响,完全是模拟人的动作进行。
主要函数如下:
def getNoReadMsg(self):
self.UiaAPI.SwitchToThisWindow()
# we = self.SessionList.TextControl(searchDepth=7)
lastLists=[]
wheeldown = True
while True:
if uia.IsKeyPressed(uia.Keys.VK_F1):
print("F1已被按下,停止采集")
break
lists = self.GetSessionList()[:-1]
if operator.eq(lists,lastLists):
if wheeldown:
wheeldown = False
else:
wheeldown = True
for who in lists:
if uia.IsKeyPressed(uia.Keys.VK_F1):
print("F1已被按下,停止采集")
return
# strtep= who[-1:3]
# who.find("新消息")
if who.find("新消息")!=-1:
self.ChatWith(who) # 打开`who`聊天窗口
msg = self.GetLastMessage() # 向`who`发送消息:你好~
print(msg)
self.ChatWith('文件传输助手') # 打开`who`聊天窗口
if wheeldown:
self.SessionList.WheelDown(wheelTimes=5, waitTime=0.1 * 2)
else:
self.SessionList.WheelUp(wheelTimes=5, waitTime=0.1 * 2)
lastLists = lists
主要实现原理是,通过滚动聊天列表,查找新消息标签,获取未读消息,然后进行解析后再处理。
另有微信实时聊天下单系统,需要定制可加好友私聊