Closed CompuGenius-Programs closed 2 years ago
I'm reluctant to start adding functions like this because it's usually fairly simple to filter windows using normal win32 calls, and every user is going to want to filter a different way (exact title match, containing match, regex match, etc..)
I'd be happy to merge a PR that adds more examples to the readme though. Something like this?
def move_window_by_name(title: str, target_desktop: int):
"""
Move any window whose title equals 'title' to virtual desktop number 'target_desktop'
"""
...
I think it would be helpful to add a way of getting a window's HWND from it's title, so that it can be used to automate moving windows in more scenarios.
I currently implemented this as follows:
I'm sure there's a way to add this into the main module, I just didn't look into it. Or, at least maybe put this code in the README in case anyone else wants it.