To continuously keep variable updated with the mouse coordinates, you can use a combination of the On Timer form event and the GET MOUSE command. A following example will set the timer to update the mouse position every 1/4th of a second.
: (Form event=On Load )
` these two variables will hold mouse button coordinates
` sets the timer to fire every second
: (Form event=On Timer )
` get mouse coordinates
GET MOUSE(mouseXcoord, mouseYcoord,$mouseButton)