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.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

JavaScript.RegisterRunScriptFunction

Registers a run script function.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JavaScript 5.4 Yes No Yes, macOS only No Yes

MBS( "JavaScript.RegisterRunScriptFunction"; JavaScriptContext; FunctionName )

Parameters

Parameter Description Example value
JavaScriptContext The reference number of the javascript context. $Context
FunctionName The name for the new function. "StartScript"

Result

Returns OK or error.

Description

Registers a run script function.
The javascript function takes first parameter the filename, second parameter the script name. Optionally third parameter is passed as text to the script.
Call for example like this: FMRunScript('Javascript.fp7', 'test', 'Hello World')

Examples

Register RunScript function:

Set Variable [$r; Value:MBS( "JavaScript.RegisterRunScriptFunction"; $$Context; "FMRunScript" )]
# later:
# FMRunScript('Javascript.fp7', 'test', 'Hello World')

See also

Example Databases


JavaScript.RegisterFunction   -   JavaScript.RegisterSQLQueryFunction

Feedback: Report problem or ask question.




Links
MBS Xojo blog