mouse_event() is clicking wrong place
I use the mouse_event to send messages to the system and it works fine, but after a while it starts clicking the wrong place.
I''ve tryed using the abolute setting with the WM_LBUTTONDOWN or which ever message it is u usually pass (can''t remember off top of my head) and it still clicks the wrong place. Is there a way I can tell it just just send a click to whereever the mouse is currently then I could just use SetCursorPos() before it.
You may be having trouble with the system giving you mouse coordinates in client/screen coordinates. To convert between the two, use these functions:
ClientToScreen()
ScreenToClient()
-Mike
ClientToScreen()
ScreenToClient()
-Mike
oh, iv found out the error, well i think i have. The button i used to start it was Ctrl+S, which called the Save function on the app it was running for and that screwed with the mouse.
It seems fine now, but an error a came accross many times was that for no reason it would all of a sudden make the mouse run really slow for a few seconds then the app would stop running, it would maximize and minimize all that like, not like a crash, but the timers that were set werent running. Then the second I pressed ANY key it all unfroze and continued. I think this may be some sort of clog in the Keyboard Hook ? anybody clarify?
It seems fine now, but an error a came accross many times was that for no reason it would all of a sudden make the mouse run really slow for a few seconds then the app would stop running, it would maximize and minimize all that like, not like a crash, but the timers that were set werent running. Then the second I pressed ANY key it all unfroze and continued. I think this may be some sort of clog in the Keyboard Hook ? anybody clarify?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement