import ctypes, time
from ctypes import wintypes

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

hwnd = 0x260814
btn = 0x4a50fd6 # ID 1404

print("Sending BM_CLICK to 'Bắt đầu' button...")
user32.PostMessageW(btn, 0x00F5, 0, 0) # BM_CLICK
user32.PostMessageW(hwnd, 0x0111, 1404, btn) # WM_COMMAND

time.sleep(2)
print("Clicked! Waiting for game process to spawn...")
