Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ScriptWorkspace.OpenScript

Opens a script by name.

Component Version macOS Windows Linux Server iOS SDK
ScriptWorkspace 7.4 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "ScriptWorkspace.OpenScript"; ScriptName { ; Group } )   More

Parameters

Parameter Description Example Flags
ScriptName The name of the script to select.
Must be visible in the left list of scripts in Script Workspace.
"Test"
Group The group the script is inside.
If the script is not found directly, we look for the group to open it, then search again.
Optional

Added in version 16.1.

Result

Returns OK or error.

Description

Opens a script by name.
The script list does not need to be visible.

Examples

Open a script in a second:

Set Variable [ $r ; Value: MBS( "Schedule.EvaluateAfterDelay"; 1; "MBS( \"ScriptWorkspace.OpenScript\"; \"Test Script\" )" ) ]

See also

Release notes

  • Version 16.1
    • Added group parameter to ScriptWorkspace.OpenScript function.
  • Version 11.1

Blog Entries

This function checks for a license.

Created 13th August 2017, last changed 16th January 2026


ScriptWorkspace.LineCount - ScriptWorkspace.ScriptNames