A wrapper around pyautogui that will make some automation processes easier.
Project description
simpleautogui by artasov
simpleautogui is a Python library designed to simplify the process of GUI automation. It builds upon the functionalities of pyautogui and provides a more intuitive and user-friendly interface for common tasks such as waiting for images to appear on the screen, clicking, moving the mouse cursor, and dragging elements. Also managing windows, arranging in a grid, etc. Send your pull requests, write issues.
Installation
Install simpleautogui using pip:
pip install simpleautogui
Fast Examples
-
Wait for image and click center on it
from simpleautogui import screen as ascreen def foo_find(): result = ascreen.wait_for_image(paths="path/to/your/image.png") if result: result.click() else: print("Image not found within the specified timeout.")
Same thing but more details
# Same thing but more details from simpleautogui import screen as ascreen def foo_find(): result = ascreen.wait_for_image( paths="path/to/your/image.png", timeout=10000, accuracy=0.9, error_dialog=False, # Continue or stop region=(0, 0, 3840, 1440), # Default fullscreen check_interval=100 ) if result: print(result) # Box(x=323, y=242, w=25, h=26, cx=2026, cy=355) result.click( # Nothing required center=True, oX=20, oY=20, clicks=10, button='ESC' # Default left mouse btn ) else: print("Image not found within the specified timeout.")
-
Arrange all windows in grid
from simpleautogui import windows as awindow def foo_all_windows_to_grid(): awindow.arrange_windows_in_grid( hwnds=awindow.get_all_windows(), rows=3, cols=3, monitors=(1,) # (2,) or (1, 2) or (3,)... )
-
Clipboard
from simpleautogui import win as awin print(awin.get_clipboard_text())
-
Region text recognition
Для использования
Region().text()
нуженTesseract
https://github.com/UB-Mannheim/tesseract/wiki
Не забудьте выбрать при установке нужные языки.
License
simpleautogui is licensed under MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file simpleautogui-0.0.4.tar.gz
.
File metadata
- Download URL: simpleautogui-0.0.4.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d853886d266dd2b519e8c3c8dd43e29b32e4c2c99fdce418550b016feb8e99bf |
|
MD5 | 4450e1b457f9e24bd3e036d2ee775989 |
|
BLAKE2b-256 | 84640d588319835ef60961adf05afa3392adae7e89ea1877cad5ea0b35a74a5d |
File details
Details for the file simpleautogui-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: simpleautogui-0.0.4-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e6d38c49c59e8a1854aae2d754c055eddeb2beef20556d2ca963faabff4695 |
|
MD5 | c2d72fb6b0268e892c985fe0be6c3b3c |
|
BLAKE2b-256 | ff141beec6137a4df1e4a337c0069ded5558677366a52c587ab472fb454b2c0c |