Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  

FM.MouseWheelScriptTrigger

Installs a script trigger for mouse wheel.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
FM 6.3 No Yes No No No

MBS( "FM.MouseWheelScriptTrigger"; FileName; ScriptName { ; MinDelay; IgnoreRectangleX; IgnoreRectangleY; IgnoreRectangleW; IgnoreRectangleH } )

Parameters

Parameter Description Example value
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 Optional
The minimum delay between script triggers.
Default is 1.
Could be 0.5 for a quicker reaction.
1
IgnoreRectangleX Optional
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.
135
IgnoreRectangleY Optional
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
IgnoreRectangleW Optional
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
IgnoreRectangleH Optional
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

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.

Turn off by calling again with empty script name.
Add option to ignore a rectangle for plugin version 7.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.

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

Example Databases


FM.MainThreadID   -   FM.NULL

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins