import win32gui

def enum_window_titles():
    def callback(hwnd, results):
        title = win32gui.GetWindowText(hwnd)
        if title:  # 제목이 있는 창만 결과에 추가
            results.append(title)
    titles = []
    win32gui.EnumWindows(callback, titles)
    return titles

# 모든 창의 제목 출력
window_titles = enum_window_titles()
for title in window_titles:
    print(title)
