To continuously keep track of the mouse coordinates you can use the "On Mouse Move" event.
For example, given a form that has two variables on it (variable1, variable2), enable the "On Mouse Move" event for the *form* and then add the following to the form method:
: (Form event=On Mouse Move )
Note that the coordinates are tracked relative to the form window's position (as oppossed to screen position) in this case. For more information see the documentation for GET MOUSE: