-
Has anyone specifically actually been able to code a real live mouse click outside of a form? I've read numerous articles and posts about using API SetCursorPos to move the mouse to a location -- works great. But the mouse_event / SendInput API functions are just not making the mouse click. Does anyone have some real working code that does this?
I have the Declares, and constants in a module...
Thanks.
-
I've done a couple of experiments witht the mouse-event API, i brought it up about a week ago as an afterthought never having used it and there seems to be a lot of peple trying to get it to work, It seems that it sends the events to the window with the focus, the dx and dy parameters seem to be the position of the click on that window, I havn't really worked it out, try using the setfocus and setcapture APIs as well, they might help. If you get both to work use setcapture as a preference, it's better not to move the focus unexpectedly.
If you need to find out what window to set the capture to, use window from point.