Code:
Public Enum MouseFlags As Int32
LEFTDOWN = &H2
LEFTUP = &H4
MIDDLEDOWN = &H20 'not used
MIDDLEUP = &H40 'not used
MOVE = &H1 'used the most :)
ABSOLUTE = &H8000 'not used
RIGHTDOWN = &H8
RIGHTUP = &H10
End Enum
Code:
API
Public Declare Sub mouse_event Lib "user32.dll" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal dwData As Integer, ByVal dwExtraInfo As Integer)
Exampel:
Code:
mouseEvent(mouseFlags.MouseDown,0,0,0,0)
threading.Thread.sleep(100)
mouseEvent(MouseFlags.MouseUp,0,0,0,0)
The code just left clicks the mouse (pretty basic) check the api documentation, the 0,0,0,0 are just the location you want to click (0,0 = current location) and the rest is...you won't use it..it's generally mouse_event(MouseFlags.Something,0,0,0,0)
BUT, this takes NO consideration to what program you want to send the mouse click to...(ie. if you want to send it to WoW, minimized to the tray bar, this won't work)