Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Sets script trigger for clicks outside card.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
EventMonitor 7.3 Yes Yes No No No
MBS( "EventMonitor.SetCardWindow"; WindowRef; X; Y; Width; Height; FileName; ScriptName )   More


Parameter Description Example value
WindowRef Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex functions. Pass zero to access the frontmost window. 0
X X position of the card in the parent window.
Can be negative for automatic center position.
Y Y position of the card in the parent window.
Can be negative for automatic center position.
Width The width of the card window. 600
Height The height of the card window. 400
FileName The file name where to find the script. Get(FileName)
ScriptName The name of the script to trigger when a click is received outside the card area. "Close Card Script"


Returns OK or error.


Sets script trigger for clicks outside card.
You can show a card and have the MBS Plugin watch for mouse clicks outside the card area. The plugin can trigger a script. As script triggers are queued up, please make sure you handle various cases like several clicks queue up.

Please call EventMonitor.Install once before and make sure it’s enabled.

With plugin version 6.0 or newer the script name can be a script ID number. In that case the plugin queries the script name for the given script ID. This allows to call scripts by ID and avoid problems if scripts are later renamed.


Install trigger:

Set Variable [ $r ; Value: MBS( "EventMonitor.Install" ) ]
Set Variable [ $$cardShowing ; Value: 1 ]
Set Variable [ $r ; Value: MBS( "EventMonitor.SetCardWindow"; Get(WindowName); -1; -1; 600; 400; Get(FileName); "Close Script" ) ]
New Window [ Style: Card ; Name: "Card" ; Using layout: “Tabelle” ; Height: 400 ; Width: 600 ]

Close script:

If [ $$cardShowing ]
    Set Variable [ $$cardShowing ; Value: 0 ]
    Close Window [ Name: "Card" ; Current file ]
    Set Variable [ $r ; Value: MBS("EventMonitor.ClearCardWindow") ]
End If

See also

Example Databases

Blog Entries

Created 2nd June 2017, last changed 2nd June 2017

EventMonitor.LastMousePositionY   -   EventMonitor.SetEnabled

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins