MoveMouse [SRC]
-
gyu es spiral gerrerro etc?XD mmm ai k poner las coordenadas tu?
-
Que tal UJ.Os traigo este codigo con el que podreis mover el puntero arrastrandolo de una coordenada a otra, el uso l odefinis vosotros.
Option Explicit
Private Type POINTAPI
X As Long
Y As Long
End TypePrivate Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)Public Function MoveMouse(ByVal FinalX As Long, ByVal FinalY As Long, _
Optional ByVal InitialX As Long = -1, Optional ByVal InitialY As Long = -1, Optional ByVal TimeToWait As Long = 5) As Boolean
On Error GoTo errDim PosActual As POINTAPI
Dim I As Long
Dim DX As Long
Dim DY As Long
Dim P As Double
Dim StepVal As IntegerGetCursorPos PosActual
If InitialX = -1 Then InitialX = PosActual.X
If InitialY = -1 Then InitialY = PosActual.YDX = (FinalX - InitialX)
DY = (FinalY - InitialY)P = (DY / DX)
If (DX < 0) Then StepVal = -1 Else StepVal = 1
For I = 1 To DX Step StepVal
SetCursorPos InitialX + I, InitialY + Round((I * P))
Sleep TimeToWait
NextMoveMouse = True
Exit Function
err:
End FunctionUn ejemplo de como se usa
MoveMouse Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, 0, 0
-
La función esa es para Visual Basic, ¿no? Deberías poner el lenguaje xD