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: 8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4    Statistic  

EventMonitor.SetCardWindow

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 { ; ScriptParameter; ScriptControl } )   More

Parameters

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.
-1
Y Y position of the card in the parent window.
Can be negative for automatic center position.
You may need to include space for formating, status toolbar and menu bar (inside window on Windows).
-1
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"
ScriptParameter Optional
Available in MBS FileMaker Plugin 9.3 or newer.
The text parameter to pass to the script.
"Close"
ScriptControl Optional
Available in MBS FileMaker Plugin 9.3 or newer.
The script control mode.
Can be Pause, Halt, Exit or Resume.
Default is Pause.
"pause"

Result

Returns OK or error.

Description

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.

Examples

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 11st June 2019


EventMonitor.LastMousePositionY   -   EventMonitor.SetEnabled

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins