Media_GetMouseUp returns the pointer coordinates. When you set an entire layout or container field as a single button performing a script with a call to this function, you know precisely where the user has clicked.
No parameter is used.
The function works only in the “View as Form” layout mode and as of FileMaker 16 is aware of text ruler, scrolling, zoom, and status area.
The response of Media_GetMouseUp contains four values separated by pipe characters “|”. The response might look like “20|45|221|300”. The first two values are the horizontal and vertical coordinates relative to the front window’s upper left corner. The 3rd and 4th values are relative to the bottom right corner.
So, if the response is:
The meaning is:
20 = Horizontal, from upper left corner
45 = Vertical, from upper left corner
221 = Horizontal, from bottom right corner
300 = Vertical, from bottom right corner
You can also use Media_ExtractInfo to easily get a specific value from the returned value list.
The coordinates returned by Media_GetMouseUp are the current mouse pointer’s position. In normal usage (when the mouse click triggers the script that contains the Media_GetMouseUp function), the current mouse position is the same or nearly the same as the last clicked position. If you have several script steps before Media_GetMouseUp, however, and if the user is still moving the mouse, then a discrepancy can occur. For this
reason, Media_GetMouseUp should be in the first script step.
Set Table::Response Field to the current mouse cursor coordinates.
Set Field[ Table::Response Field ; Media_GetMouseUp ]