python get list of all open windows

Solutions on MaxInterview for python get list of all open windows by the best coders in the world

showing results for - "python get list of all open windows"
Carl
25 Aug 2020
1import win32gui
2
3def winEnumHandler( hwnd, ctx ):
4    if win32gui.IsWindowVisible( hwnd ):
5        print (hex(hwnd), win32gui.GetWindowText( hwnd ))
6
7win32gui.EnumWindows( winEnumHandler, None )