Skip to main content

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())
    

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

simpleautogui-0.0.3.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

simpleautogui-0.0.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file simpleautogui-0.0.3.tar.gz.

File metadata

  • Download URL: simpleautogui-0.0.3.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for simpleautogui-0.0.3.tar.gz
Algorithm Hash digest
SHA256 29ae611a6696a1e1fa74b478bfa4db7d6a707d5d7abe5ed85bcb8fe7c86d567d
MD5 c26fc4851e9ceb9d70a8c0f1fbbed669
BLAKE2b-256 1116cac29fa98cd44a7ee9da24d955ed62f40bde34a1f002e0732eb68fc0503b

See more details on using hashes here.

File details

Details for the file simpleautogui-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for simpleautogui-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff4e006c11664f27c2d76a415c28b7cfa4bda3e456a0b9f17e78e9710c00150
MD5 65d19cbb8233f27f17fbfd3032a82382
BLAKE2b-256 98639318bd8ccbf660aa8770a04b3d290e1176860fa098e3a66eac897e98c159

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page