Metadata-Version: 2.1
Name: systa
Version: 0.2.0
Summary: Windows GUI automation with a cool API.
Home-page: https://github.com/dmwyatt/systa
License: MIT
Keywords: automation,windows
Author: Dustin Wyatt
Author-email: dustin.wyatt@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Desktop Environment :: Window Managers
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Systems Administration
Requires-Dist: boltons (>=21.0.0,<22.0.0)
Requires-Dist: pynput (>=1.7.3,<2.0.0)
Requires-Dist: pywin32 (>=301,<302)
Requires-Dist: typeguard (>=2.12.0,<3.0.0)
Requires-Dist: typing-inspect (>=0.7.1,<0.8.0)
Project-URL: Documentation, https://dmwyatt.github.io/systa/
Project-URL: Repository, https://github.com/dmwyatt/systa
Description-Content-Type: text/x-rst

Systa: A ``Window`` for `windows <https://en.wikipedia.org/wiki/Window_(computing)>`_ on `Windows™ <https://en.wikipedia.org/wiki/Microsoft_Windows>`_.
==========================================================================================================================================================

**Systa** is a Microsoft Windows automation library, built for people who aren't Microsoft
Windows programming gurus.

`Documentation. <https://dmwyatt.github.io/systa/>`_

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.

.. code-block:: python

  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:

1. A window is opened ``OR`` a window is restored from a minimized state.
2. ``AND`` the window's title ends with the string ``Notepad``.
3. ``AND`` the window's size is less than 200x200.

