Dim LastX, LastY, x, y, ex, ey
Rem key
Key=WaitKey()
While Key = 16
GetCursorPos LastX,LastY
Delay 30
GetCursorPos x,y
ex = x - LastX
ey = y - LastY
If ey>0
KeyPress 73,1
Delay 10
ElseIf ey < 0
KeyPress 75,1
Delay 10
EndIf
LastX = x : LastY = y
MoveTo 700, 500
Goto key
EndWhile