slashshot007
Active Member
- Joined
- May 6, 2006
- Sythe Gold
- 0
- Messages
- 164
i made a better version:
this time the speed is changed by changing the number of steps.
the number of steps obviously varies. if the selected object is far away, then more steps. if its close, then less steps.
but you want no less then ten, and no more then 150 lol.
Code:
Sub MoveMouseSmooth(ByVal x As Integer, ByVal y As Integer, ByVal steps As Integer)
Dim i As Integer, x2 As Integer, y2 As Integer
x2 = (x - Windows.Forms.Cursor.Position.X) / steps
y2 = (y - Windows.Forms.Cursor.Position.Y) / steps
For i = 1 To steps
Windows.Forms.Cursor.Position = New Point(Windows.Forms.Cursor.Position.X + x2, Windows.Forms.Cursor.Position.Y + y2)
Wait(5)
Next
Windows.Forms.Cursor.Position = New Point(x, y)
End Sub
this time the speed is changed by changing the number of steps.
the number of steps obviously varies. if the selected object is far away, then more steps. if its close, then less steps.
but you want no less then ten, and no more then 150 lol.

