mouse.location

Syntax mouse.location ()

Params None required

Action Determines the horizontal and vertical coordinates of the mouse's location relative to the frontmost window.

Returns A point consisting of two numbers indicating the horizontal and vertical coordinates of the mouse's location relative to the frontmost window.

Examples scratchpad.mouseAt = mouse.location ()

   » {393,181}

point.get (mouse.location, @horiz, @vert);
msg ("Horiz: " + horiz + "Vert: " + vert)
If you made the two-line script above a background, or agent, script, you could continuously monitor the position of the mouse. You could also, of course, drive yourself mad.

Notes This is an advanced Frontier verb of primary interest to implementers and advanced scripters. It is not necessary to understand it to use Frontier effectively for most tasks.

Discuss