pythonwindowspyautogui

Python pyautogui window handle


Using pyautogui is there a way to get a handle to a window so that I can ensure that a click is performed on that window only? In other words, if my window isn't in focus, then the click does not occur. Additionally, if my window isn't in focus then I bring it into focus and then perform the actions.

The way to identify a window could be an ID, window title etc similar to this https://autohotkey.com/docs/commands/WinGet.htm

Is there any other Python module that supports this kind of functionality?


Solution

  • Is there any other Python module that supports this kind of functionality?

    https://github.com/pywinauto/pywinauto

    https://pywinauto.readthedocs.io/en/latest/#some-similar-tools-for-comparison lists as other similar Python tools: