
-----------------------------------
HazySmoke)345
Fri Nov 18, 2005 5:08 pm

Is there a way to force your mouse to move?
-----------------------------------
Such as, forcing it to move and click somewhere and such using a program. Is it possible to code it with VB?

-----------------------------------
[Gandalf]
Fri Nov 18, 2005 7:08 pm


-----------------------------------
Not sure about VB, but it is highly possible using macros.  Look them up on google and you will find everything you need.

-----------------------------------
Brightguy
Fri Nov 18, 2005 10:30 pm

Re: Is there a way to force your mouse to move?
-----------------------------------
Play around with Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4

Private Sub SimulateClick(x As Long, y As Long)
    SetCursorPos x, y
    mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0&
End Sub
