Let’s say I’ve got a window for which I want to simulate a mouse click
at a specific x, y coordinate. I already have the hwnd but I’m not sure
how to construct the lParam. I’ve used SendMessage in the past to click
on buttons, etc., but I knew their hwnds.
Any help would be greatly appreciated. I also can’t help but wonder if
I’m going about this the right way. My end goal is clicking on a certain
user on skype main window (for example). I used EnumChildWindows
to find all the main window’s children, but couldn’t find the right one. So
figured I would try to ‘click’ on it using coordinates.
Let’s say I’ve got a window for which I want to simulate a mouse
Share
You can use the low level windows api thanks to ctypes. See an example below (adapted from something i didn’t test it but it should be ok)
Update:
I didn’t test the code below but I think that it should help you to write something to get the child position. Then you can try to click at the correct position.