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.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleautogui-0.0.2.tar.gz
  • Upload date:
  • Size: 8.0 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.2.tar.gz
Algorithm Hash digest
SHA256 cc4bd983014256e27fa94a71f654fec57dafe10d90b1ad1ab6c131073a056806
MD5 f79da0bf735b3d477b87098e166dfef4
BLAKE2b-256 08c538d3d318c905614192c5027957f96d6f35d87892132002f5e00f722bc842

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleautogui-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 161c23f1cd8d76b32b91f8c3ec274fef12fe98ba5da16d59af504abcba60d396
MD5 45e9017d12318a88ad642f4f6ad60c19
BLAKE2b-256 76718753144178ef3b4d90826b34e26fbc3684d75e9e4e82c21cba1fe8a1ebd6

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