How to get a list of the name of every open window?

You can use win32gui.GetWindowText( hwnd ) along with win32gui.EnumWindows: import win32gui def winEnumHandler( hwnd, ctx ): if win32gui.IsWindowVisible( hwnd ): print ( hex( hwnd ), win32gui.GetWindowText( hwnd ) ) win32gui.EnumWindows( winEnumHandler, None ) Output: 0x20fa4 bet – [C:\Users\X\Desktop\] – [bet] – L:\stack\stack_enum_windows.py – IntelliJ IDEA 2017.2.5 0x1932478 13. vnc 888 0x30c27b8 Telegram (55) 0x40aba MobaXterm … Read more

Python – Control window with pywinauto while the window is minimized or hidden

The problem is here: Wizard[‘Create Shortcut on Desktop’].wait(‘enabled’).check_by_click() check_by_click() uses click_input() method that moves real mouse cursor and performs a realistic click. Use check() method instead. [EDIT] If the installer doesn’t handle BM_SETCHECK properly the workaround may look so: checkbox = Wizard[‘Create Shortcut on Desktop’].wait(‘enabled’) if checkbox.get_check_state() != pywinauto.win32defines.BST_CHECKED: checkbox.click() I will fix it in … Read more