From 3ac1066fedace402eeb184d787f10f4d59a762a6 Mon Sep 17 00:00:00 2001 From: Llloooggg Date: Fri, 10 Mar 2023 03:14:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BB=D1=8F=20=D1=83=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B0=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D1=81=D0=BA=D1=80=D0=B8=D0=BD=D1=88=D0=BE=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 282b3c5..6179416 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import time import logging import numpy as np import pygetwindow as gw @@ -52,10 +53,11 @@ def get_screenshot(): eve_window.activate() if save_result: - filepath = "images/screenshot.png" + filepath = "images/0_screenshot.png" else: filepath = None + time.sleep(0.5) screenshot = pyautogui.screenshot( filepath, region=( @@ -87,7 +89,7 @@ def get_boxes(screenshot): if save_result: save_highlighted_screenshot( - screenshot, base_boxes, "base_highlighted_screenshot" + screenshot, base_boxes, "1_base_highlighted_screenshot" ) base_boxes.to_excel("xlsx/base_boxes.xlsx", index=False) @@ -127,5 +129,5 @@ base_boxes = get_boxes(screenshot) unioned_boxes = union_boxes(base_boxes) save_highlighted_screenshot( - screenshot, unioned_boxes, "unioned_highlighted_screenshot" + screenshot, unioned_boxes, "2_unioned_highlighted_screenshot" )