Windows GUI automation with a cool API.
Project description
Systa is a Microsoft Windows automation library, built for people who aren’t Microsoft Windows programming gurus.
Install
pip install systa
Basic Usage
>>> from systa.windows import current_windows >>> "Untitled - Notepad" in current_windows True >>> "🍔" in current_windows False >>> notepad = current_windows["Untitled - Notepad"][0] >>> notepad.maximized False >>> notepad.maximized = True # it's now maximized >>> notepad.maximized True
Events
The real power of systa springs from its integration with Windows system hooks. You can run code when things happen on the system.
from systa.events.decorators import listen_to, filter_by
from systa.events.store import callback_store
from systa.events.types import EventData
@filter_by.require_size_is_less_than(200, 200)
@filter_by.require_title("*Notepad")
@listen_to.restore
@listen_to.create
def a_func_to_do_the_thing(event_data: EventData):
print(f"Notepad restored or created! ({event_data.window.width}, {event_data.window.height})")
callback_store.run()
The above code prints a message when:
A window is opened OR a window is restored from a minimized state.
AND the window’s title ends with the string Notepad.
AND the window’s size is less than 200x200.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
systa-0.2.1.tar.gz
(35.0 kB
view details)
Built Distribution
systa-0.2.1-py3-none-any.whl
(41.2 kB
view details)
File details
Details for the file systa-0.2.1.tar.gz
.
File metadata
- Download URL: systa-0.2.1.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd42f497e603f1ff586026d292f4a476d9d23fb392dab4b000dae43a901cf2ea |
|
MD5 | 2a140d47d21aecd4d55df84901634a52 |
|
BLAKE2b-256 | 9a8c7f9713ff58e901976360983f072026c4807d1d5edfa449ed961f82aee9bd |
File details
Details for the file systa-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: systa-0.2.1-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6514ed5c8430108ca72e9f7586c04df8451053f84e04118a9ddf34d2b1afbd1c |
|
MD5 | dc1d2863a3ed860c9f8d466f2dbbe1ed |
|
BLAKE2b-256 | 7eb7d4a6d31f2a2c98c48ff60ba6e34db1566b8f17193bb510fc33bd406fa989 |