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:
10.5
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
Statistic
FMM
Blog
FM.RunScriptLater
Runs a script in any open FileMaker file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
FM | 1.2 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | Free |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
DelaySeconds | The Number of Seconds to wait before running the script. | 10 | |
FileName | The name of the file that contains the script to be run | Get(Filename) | |
ScriptName | The exact name of the script to run | "TestScript" | |
ScriptParameter | Optional, he Script Parameter to pass to the script | Optional |
Result
Returns OK on success or error message on failure.
Description
Runs a script in any open FileMaker file.You can also pass a text string to the Script as a Parameter. The parameter can be retrieved by using Get(ScriptParameter) in the script that plug-in is calling.
see also Schedule.StartScriptAfterDelay, FM.RunScriptIdle, FM.RunScript and Schedule functions.
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
Trigger a script later
Let(
[
/*-----------------PARAMETERS--------------------*/
DelaySeconds = 5;
FileName = Get ( FileName );
ScriptName = "Triggered Script Demo 2";
ScriptParameter = "Some Data"
];
/*-------------------FUNCTION----------------------*/
MBS(
"FM.RunScriptLater";
DelaySeconds;
FileName;
ScriptName;
ScriptParameter
)
)
See also
- App.OpenFile
- AVPlayer.AddView
- DragDrop.CreateWithControl
- FM.QueryCustomFunctionsList
- FM.RunDatabaseDesignReport
- FM.RunScript
- FM.RunScriptIdle
- MapView.CreateWithControl
- Schedule.StartScriptAfterDelay
- TextView.CreateWithControl
Example Databases
- Drag and Drop/DragTest Popover
- iOS/MapKit iOS
- Mac only/Process FrontMost
- RemoteControl/Press keys
- Utility functions/RunScript
- WebViewer/WebViewer IsLoading
Blog Entries
Created 18th August 2014, last changed 16th September 2019
Feedback: Report problem or ask question.
