MoveMouse x,y  

Definition:

Moves the mouse pointer to a designated location on the screen.

Parameter Description:


x = the x coordinate on the screen to move the mouse
y = the y coordinate on the screen to move the mouse

Command Description:

Although the mouse isn't visible on the screen, the mouse location is still being tracked and you can attach a graphic to it. However, there are times when you want to put the pointer to a specific location on the screen. Use this command to move the mouse to a designated location.

Example:

; MoveMouse Example

Graphics 640,480
For t = 1 To 2
Print "Move the mouse around and push the left button."
WaitMouse()
Print "The mouse is currently located at: " + MouseX() + "," + MouseY() + "."
Next
Print "Now I'll move the mouse ..."
MoveMouse 320,320
Print "The mouse is NOW located at: " + MouseX() + "," + MouseY() + "."
Print "Click mouse button to quit."
WaitMouse()

Index