I use
Private Declare Sub ClickMouse Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
the old out of date "mouse_event" API for my bot because the new SendInput required complicated structures i had troubles getting to work in VB. I recently added ScreenSize Support and i identified a bug with one of my mouse flags. I had to guess the correct constants to use for this API and currently i believe
Const MOUSEEVENTF_LEFTMOVE = &H1
is not the correct constant i should be using. typicaly i dont need to send a mouse message with this constant, except to buy logs and a few other things the game requires it, or else it fails to click. Does anyone know the actual values for the constants to use on this API? or atleast a better constant i should try?
Right now at certain points in time when i use this constant, while running the game windowed, the bot will click outside of the game area. If you run the game windowed make sure there is nothing to the right of the game, maybe move the game to the right side of your screen until i figure out what to do. It seems to only click on the far right side of the screen, so just make sure either the game is there or the desktop.
If someone knows the API's a little better than me, clue me on how to fix this.
<hr>Append on Apr 15 2007, 20:47<hr> I recently adjsuted how i use this constant. I believe that when mouse message 1 is sent i increments mouse position according to X and Y. so now i reset cursor position to 0,0 then send the message like normal.
Does anyone know if this is the correct usage? So far i've had no problems.