« Text data type | Home | WMI queries in FileMa… »

EventMonitor

Recently a client tried our menu commands to build a contextual menu. His problem was that the mouse click is consumed and processed by FileMaker and he had no idea which mouse button was used to trigger the button and his script. At the time the script run, the mouse button was up already. No way to ask the operation system what button is down.

To help here we added EventMonitor functions to our plugin. Currently you can use them to only detect if last mouse event was due to left or right mouse button. Your script can query that and know the state of the mouse buttons.

We got three new functions:
EventMonitor.Install to call once at startup to tell plugin to monitor events.
EventMonitor.Clear to clear current state if needed.
EventMonitor.LastMouseClickButton to query last mouse event's mouse button.

Technically we could add more things here like the mouse position at the time of click.
Maybe you have ideas for more cool functions?

Now enjoy all using MBS Plugin to present contextual menus in FileMaker and decide in your script what to do based on the mouse button.
22 06 15 - 16:58