fix: QQ裁剪回退0.25 + 轮询加速2周期
1. QQ cap_left 0.50→0.25 回退到5de2521状态,消息面板覆盖左半侧,用户消息不再被切掉 颜色检测+md过滤负责拦截bot回复残片,无需用0.50避开会话列表 2. QQ降频4周期→2周期(~8s→~4s),用户消息响应加快
This commit is contained in:
+4
-5
@@ -258,9 +258,9 @@ class MessageMonitor:
|
||||
if self._wechat_enabled and not self._sending_event.is_set():
|
||||
self._poll("wechat")
|
||||
if self._qq_enabled:
|
||||
# QQ 降频:每 4 周期 poll 一次(~8s,OCR 计算略重)
|
||||
# QQ 降频:每 2 周期 poll 一次(~4s),用户消息不会等太久
|
||||
self._qq_skip_counter += 1
|
||||
if self._qq_skip_counter >= 4 and not self._sending_event.is_set():
|
||||
if self._qq_skip_counter >= 2 and not self._sending_event.is_set():
|
||||
self._qq_skip_counter = 0
|
||||
self._poll("qq")
|
||||
except Exception as e:
|
||||
@@ -959,9 +959,8 @@ class MessageMonitor:
|
||||
win32gui.PostMessage(hwnd, win32con.WM_KEYUP, win32con.VK_END, 0)
|
||||
time.sleep(0.3)
|
||||
# TIM 窗口布局: ~5-30% 左栏, ~30-50% 会话列表(含文档预览), ~50-100% 消息面板
|
||||
# cap_left=50% 从消息面板左边界开始,避开会话列表干扰(文本→颜色检测 false)
|
||||
# 右边界 78% 排除群成员侧栏(~80%+), md 过滤负责拦截 bot 的 md 格式回复
|
||||
cap_left = int(left + win_w * 0.50)
|
||||
# cap_left=25% 覆盖消息面板左半侧,捕获用户消息;颜色检测+md过滤拦截bot回复
|
||||
cap_left = int(left + win_w * 0.25)
|
||||
cap_top = top + max(80, int(win_h * 0.06)) # 跳过标题栏+群名头栏
|
||||
cap_right = int(left + win_w * 0.78) # 跳过右栏群成员列表(~80%+) 和滚动条
|
||||
cap_bottom = bottom - max(100, int(win_h * 0.10)) # 输入框上方
|
||||
|
||||
Reference in New Issue
Block a user