Skip to content

lexter0705/appwindows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

423 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License - BSD 3-Clause unit_tests
PyPI Downloads Documentation
PyPi Github Issues

Appwindows

The appwindows library provides a unified way to find, inspect, and control application windows across Windows, macOS, and Linux.

Supported platforms:

  1. Windows 10 and later
  2. MacOS 12.2 and later
  3. Linux with XServer (Wayland works, but with very significant limitations)

Install

pip install appwindows

Examples

  1. Create window screenshot
from appwindows import get_finder
from appwindows.geometry import Size

finder = get_finder()

window = finder.get_window_by_title("Some title")

window.get_screenshot() # numpy.ndarray whith image
  1. Move window
from appwindows import get_finder
from appwindows.geometry import Point

finder = get_finder()

window = finder.get_window_by_title("Some title")

window.move(Point(x=200, y=200))
  1. Get window coordinates and size
from appwindows import get_finder

finder = get_finder()

window = finder.get_window_by_title("Some title")

points = window.get_points()
size = window.get_size()

print(points.left_top) # appwindows.geometry.Point(x=200, y=200)
print(size)            # appwindows.geometry.Size(width=200, height=200)

Why "appwindows"?

Comparison Point PyGetWindow PyWinCtl appwindows
Cross-Platform (macOS, Linux, Windows)
Can Take Screenshots
Actively Maintained
Has CI/CD Testing
Error Handling
Documentation

Docs

All documentation here
Link to PyPi

For Developers

  1. If something doesn't work - open issue.
  2. If you want something fixed - open issue.
  3. If you can help with the library - email.

apparser.development@gmail.com

Any help in development is welcome)!