The API code was included at the bottom of the first post, as the second example:
Declare Dynamic Library "user32"
Function SetCursorPos (ByVal x As Long, Byval y As Long)
End Declare
Screen _NewImage(300, 300, 32)
waitScreen
winX = _DesktopWidth / 2
winY = _DesktopHeight / 2
_ScreenMove winX, winY
DMouseX = 100
DmouseY = 100
Do
k$ = InKey$
If k$ = " " Then
MoveDesktopMouse DMouseX, DmouseY
Print " we move mouse pointer at "; DMouseX; " "; DmouseY
If DMouseX < _DesktopWidth - 100 Then DMouseX = DMouseX + 100 Else DMouseX = 100
If DmouseY < _DesktopHeight - 100 Then DmouseY = DmouseY + 100 Else DmouseY = 100
End If
_Limit 20
Loop Until k$ = "m"
End
Sub MoveDesktopMouse (x As Integer, y As Integer)
Print SetCursorPos(x, y)
End Sub
Sub waitScreen
Do While Not _ScreenExists: Loop
End Sub
Sometimes it's just fun to try and think outside the box and try to find a method to use normal commands in abnormal ways -- which is what Tempodi is playing around here with.