OCR左边界40%→33%继续左移避开自身消息\n\n- cap_left 从 0.40 降到 0.33,幅度更大\n- 目标:只捕获左侧他人消息区域
This commit is contained in:
+2
-2
@@ -570,8 +570,8 @@ class MessageMonitor:
|
|||||||
# 先切 QQ 到前台再截屏,避免 CMD 窗口遮挡→OCR 读到终端文字
|
# 先切 QQ 到前台再截屏,避免 CMD 窗口遮挡→OCR 读到终端文字
|
||||||
self._ensure_foreground(hwnd)
|
self._ensure_foreground(hwnd)
|
||||||
time.sleep(0.15)
|
time.sleep(0.15)
|
||||||
# 左边界进一步往左调到 40%,捕获消息文字(而非时间戳/UI 碎片)
|
# 左边界调到 33%,捕获更靠左的消息文字
|
||||||
cap_left = int(left + win_w * 0.40)
|
cap_left = int(left + win_w * 0.33)
|
||||||
cap_top = top + max(40, int(win_h * 0.04)) # 标题栏下方
|
cap_top = top + max(40, int(win_h * 0.04)) # 标题栏下方
|
||||||
cap_right = int(left + win_w * 0.95) # 跳过滚动条
|
cap_right = int(left + win_w * 0.95) # 跳过滚动条
|
||||||
cap_bottom = bottom - max(100, int(win_h * 0.10)) # 输入框上方
|
cap_bottom = bottom - max(100, int(win_h * 0.10)) # 输入框上方
|
||||||
|
|||||||
Reference in New Issue
Block a user