import sys, ctypes, win32gui, win32process, psutil
sys.stdout.reconfigure(encoding='utf-8')

user32 = ctypes.windll.user32
hdesk = user32.OpenInputDesktop(0, False, 0x01FF)
if hdesk: user32.SetThreadDesktop(hdesk)

print("=== ALL RELEVANT WINDOWS ===")
def cb(h, _):
    if win32gui.IsWindowVisible(h):
        txt = win32gui.GetWindowText(h)
        cls = win32gui.GetClassName(h)
        _, pid = win32process.GetWindowThreadProcessId(h)
        try:
            pname = psutil.Process(pid).name()
        except:
            pname = "unknown"
        if any(w in txt.lower() or w in pname.lower() for w in ['auto', 'võ', 'trọn', 'game', 'vctk', 'bắt đầu', 'mở auto']):
            rect = win32gui.GetWindowRect(h)
            print(f"HWND: 0x{h:08X}, PID: {pid} ({pname}), Class: {cls}, Rect: {rect}, Title: {repr(txt)}")
win32gui.EnumWindows(cb, None)
