computer-use-ootb-internal 0.0.195__py3-none-any.whl → 0.0.196__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py +21 -8
- {computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/RECORD +5 -5
- {computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/entry_points.txt +0 -0
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py
CHANGED
@@ -11,6 +11,7 @@ import time
|
|
11
11
|
import win32gui
|
12
12
|
from typing import List, Tuple, Dict
|
13
13
|
from screeninfo import get_monitors
|
14
|
+
import pyautogui
|
14
15
|
|
15
16
|
|
16
17
|
class Rectangle:
|
@@ -240,15 +241,27 @@ class GUICapture:
|
|
240
241
|
|
241
242
|
# Get monitor dimensions from visibility_checker
|
242
243
|
monitor = self.visibility_checker.monitor
|
243
|
-
# Capture screenshot of the specific monitor
|
244
|
-
# screenshot = auto.GetRootControl().ToBitmap(monitor.left, monitor.top,
|
245
|
-
# monitor.right - monitor.left,
|
246
|
-
# monitor.bottom - monitor.top)
|
247
|
-
bbox=(monitor.left, monitor.top,
|
248
|
-
monitor.right, monitor.bottom)
|
249
|
-
screenshot = ImageGrab.grab(bbox=bbox, all_screens=True)
|
250
244
|
|
251
|
-
|
245
|
+
# Define the bounding box for pyautogui
|
246
|
+
# bbox for ImageGrab is (left, top, right, bottom)
|
247
|
+
# region for pyautogui is (left, top, width, height)
|
248
|
+
pyautogui_region = (
|
249
|
+
monitor.left,
|
250
|
+
monitor.top,
|
251
|
+
monitor.right - monitor.left,
|
252
|
+
monitor.bottom - monitor.top
|
253
|
+
)
|
254
|
+
|
255
|
+
# Capture screenshot of the specific monitor region using pyautogui
|
256
|
+
try:
|
257
|
+
screenshot = pyautogui.screenshot(region=pyautogui_region)
|
258
|
+
except Exception as e:
|
259
|
+
# Add logging or raise a more specific exception if needed
|
260
|
+
print(f"Error during pyautogui.screenshot: {e}")
|
261
|
+
# Fallback or re-raise, depending on desired error handling
|
262
|
+
# For now, let's re-raise to make it clear an error occurred.
|
263
|
+
raise
|
264
|
+
|
252
265
|
screenshot.save(screenshot_path)
|
253
266
|
return screenshot_path
|
254
267
|
|
{computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/RECORD
RENAMED
@@ -13,7 +13,7 @@ computer_use_ootb_internal/computer_use_demo/animation/icons8-select-cursor-tran
|
|
13
13
|
computer_use_ootb_internal/computer_use_demo/animation/test_animation.py,sha256=2R1u98OLKYalSZ5nt5vvyZ71FL5R5vLv-n8zM8jVdV8,1183
|
14
14
|
computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py,sha256=7wG3K4s2HkLznXPRER4jOo20qakFA9Iw_tYMg9d3r9s,16154
|
15
15
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/__init__.py,sha256=h2CNeuACklxVpJC65QR8_6AvSybEZLmeO45hY_-lLBs,61
|
16
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py,sha256=
|
16
|
+
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py,sha256=idoCVRKPQ-2MealPrEHULMHSIlVtHzbpX3uwR4nFI8o,14251
|
17
17
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py,sha256=OOVxy4Qlbk5q-X9kXFXqt6AmuOMl6FWWqtH269DvJJA,10005
|
18
18
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_cli.py,sha256=hrUBH3aeUe9t4EDsMhaUZLPpNLKeEaG4ZvikrFy-bOU,1313
|
@@ -39,7 +39,7 @@ computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=eHaDOIJnBJ9Q
|
|
39
39
|
computer_use_ootb_internal/preparation/pr_prepare.py,sha256=_4wHv0-q7D_kY6_niggulWxahZqIafQHGyWxcFSPzcc,6136
|
40
40
|
computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=r0b19M_c1sXkN3_MRFjql8w_ThC9nZUe8zbSLYUvKS8,4635
|
41
41
|
computer_use_ootb_internal/preparation/word_prepare.py,sha256=-SKbzckosEcOI5v2M5Pg7iFw9jTS5INJ6EoT5cHIqko,5172
|
42
|
-
computer_use_ootb_internal-0.0.
|
43
|
-
computer_use_ootb_internal-0.0.
|
44
|
-
computer_use_ootb_internal-0.0.
|
45
|
-
computer_use_ootb_internal-0.0.
|
42
|
+
computer_use_ootb_internal-0.0.196.dist-info/METADATA,sha256=p_2H7YTPhMizlvbsR1tuCBD5ChqZ8_Ke8r06j-eJwF0,1048
|
43
|
+
computer_use_ootb_internal-0.0.196.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
44
|
+
computer_use_ootb_internal-0.0.196.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
|
45
|
+
computer_use_ootb_internal-0.0.196.dist-info/RECORD,,
|
{computer_use_ootb_internal-0.0.195.dist-info → computer_use_ootb_internal-0.0.196.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|