修复不能管理已经打开微信

This commit is contained in:
evilbeast
2022-08-25 12:37:49 +08:00
parent 29c5846c12
commit bc17f10924
12 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import xml.dom.minidom
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
# 注册消息回调
+2 -1
View File
@@ -5,7 +5,8 @@ import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
# 注册消息回调
+1 -1
View File
@@ -5,7 +5,7 @@ import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
def on_recv_text_msg(wechat_instance: ntchat.WeChat, message):
+1 -1
View File
@@ -5,7 +5,7 @@ import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
# 等待登录
wechat.wait_login()
+1 -1
View File
@@ -5,7 +5,7 @@ import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
# 等待登录
wechat.wait_login()
+1 -1
View File
@@ -5,5 +5,5 @@ import ntchat
# 多开3个微信
for i in range(3):
wechat = ntchat.WeChat()
wechat.open()
wechat.open(smart=False)
+1 -1
View File
@@ -5,7 +5,7 @@ import ntchat
wechat = ntchat.WeChat()
# 打开pc微信, smart: 是否管理已经登录的微信
wechat.open(smart=False)
wechat.open(smart=True)
# 等待登录
wechat.wait_login()
+1 -1
View File
@@ -24,7 +24,7 @@ class NtChatWindow(XWindow):
def on_btn_open_clicked(self, sender, _):
self.wechat_instance = ntchat.WeChat()
self.wechat_instance.open()
self.wechat_instance.open(smart=True)
self.wechat_instance.on(ntchat.MT_ALL, self.on_recv_message)
def on_btn_send_clicked(self, sender, _):