code: def getWindowTitle(self, hwnd):
          
          length = ctypes.windll.user32.GetWindowTextLengthW(hwnd)
          buff = ctypes.create_unicode_buffer(length + 1)
          ctypes.windll.user32.GetWindowTextW(hwnd, buff, length + 1)
          return buff.value
docs: Gets the title for the specified window