Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

FM.MouseWheelScriptTrigger

Installs a script trigger for mouse wheel.

Component Version macOS Windows Linux Server iOS SDK
FM 6.3 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "FM.MouseWheelScriptTrigger"; FileName; ScriptName { ; MinDelay; IgnoreRectangleX; IgnoreRectangleY; IgnoreRectangleW; IgnoreRectangleH } )   More

Parameters

Parameter Description Example Flags
FileName The file name for the script. Get(Filename)
ScriptName The name of the script to trigger.
Can be empty to disable feature.
"WheelScriptTrigger"
MinDelay The minimum delay between script triggers.
Default is 1.
Could be 0.5 for a quicker reaction.
1 Optional
IgnoreRectangleX Available in MBS FileMaker Plugin 7.1 or newer.
The X position of the rectangle where scroll action is ignored if the mouse is inside. Relative to the parent window.
Default is -1 to have no such rectangle.

Rectangle area is Windows only.
135 Optional
IgnoreRectangleY Available in MBS FileMaker Plugin 7.1 or newer.
The Y position of the rectangle where scroll action is ignored if the mouse is inside. Relative to the parent window.
Default is -1 to have no such rectangle.
55 Optional
IgnoreRectangleW Available in MBS FileMaker Plugin 7.1 or newer.
The width of the rectangle where scroll action is ignored if the mouse is inside. Relative to the parent window.
Default is -1 to have no such rectangle.
400 Optional
IgnoreRectangleH Available in MBS FileMaker Plugin 7.1 or newer.
The height of the rectangle where scroll action is ignored if the mouse is inside. Relative to the parent window.
Default is -1 to have no such rectangle.
500 Optional

Result

Returns OK or error.

Description

Installs a script trigger for mouse wheel.
If you like to have a script triggered to switch records on Windows with mouse wheel, you can use this function.
The script parameter is the delta on mouse wheel usage. 120 is one tick down and negative value means movement up.
The script is called at most once every second (by default).

Turn off by calling again with empty script name. This setting is global, so you may just install once in start script.
Add option to ignore a rectangle for plugin version 7.1.

Implemented for Mac and FileMaker 16 or newer with MBS Plugin 9.1.

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.

FileMaker 19.2 adds a fmplugin extended privileges. You my need to add such an extended privileges to allow the plugin to trigger scripts. See FileMaker product documentation for details.

Examples

Installs trigger:

MBS("FM.MouseWheelScriptTrigger"; Get(FileName); "MouseTrigger")

Sample MouseTrigger script to move between records:

If [Get ( ActiveFieldName ) = ""]
    Set Variable [$r; Value:Round(Get(ScriptParameter) / 120; 0)]
    Go to Record/Request/Page [No dialog; Get ( RecordNumber ) + $r]
    // Set Variable [$r; Value:MBS("Log"; "MouseWheel " & $r)]
End If

See also

Release notes

Example Databases

Blog Entries

Created 27th May 2016, last changed 18th February 2019


FM.MainThreadID - FM.NULL

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins

Start Chat