[ad_1]
I need to send a message to an inactive window that my mouse clicked using ctypes. I’m trying to do this via SendMessageA, but nothing happens. I define the hwnd and open another window on top of this one, then it should just click in the initial window. How do I do this?
hwnd = ctypes.windll.user32.GetForegroundWindow()
time.sleep(10)
ctypes.windll.user32.SendMessageA(hwnd, 0x0201, 0, 0)
ctypes.windll.user32.SendMessageA(hwnd, 0x0202, 0, 0)
[ad_2]