From 40ada7f96d3b12b489b63cb218db03d204347ee8 Mon Sep 17 00:00:00 2001 From: gabriel20xx Date: Mon, 7 Jul 2025 21:39:16 +0200 Subject: [PATCH] fix error --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index e300e03..bdfd93f 100644 --- a/main.py +++ b/main.py @@ -147,7 +147,7 @@ class MainWindow(QtWidgets.QMainWindow): if w.title == selected_window: win = w break - if win is not None and win.isVisible: + if win is not None and win.width > 0 and win.height > 0: x, y, w_, h_ = win.left, win.top, win.width, win.height screen = pyautogui.screenshot(region=(x, y, w_, h_)) offset_x, offset_y = x, y