my_window_mode = WindowMode(1,0,1,0,0)
WindowOpen ( 0, "My App", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, 640, 480, my_window_mode, 1 )
Dim x, y, mb1, mb2, mb3
While WindowExists( 0 )
GetGlobalMouse ( x, y, mb1, mb2, mb3 )
Print "Mouse position is "; x; ","; y
Update()
Wend
This will open a 640 x 480 window and keep printing the global mouse position until the window is closed.