SendMessage(window_handle, WM_LBUTTONUP, MK_LBUTTON, coordinates_parameter)
SendMessage(window_handle, WM_LBUTTONDOWN, MK_LBUTTON, coordinates_parameter) For simulating clicks, I tried using the Windows API with SendMessage() but it did nothing: void click_with_send_message(HWND window_handle, POINT client_coordinates)Ĭonst auto coordinates_parameter = MAKELPARAM(client_coordinates.x, client_coordinates.y) I'm working on an autonomous bot for a Unity game on Windows.