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.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0    Statistic    FMM    Blog  


Compiles the script and returns the Script ID.

Component Version macOS Windows Linux Server iOS SDK
AppleScript 1.0 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ❌ No
MBS( "AppleScript.Compile"; Script Text )   More


Parameter Description Example
Script Text This is the text of the script to compile "3 + 4"


Returns ScriptID or error.


Compiles the script and returns the Script ID.
You can use the Script ID to run the script using the AppleScript.Execute function. The compiled script is stored in memory. This is useful if you have large script that needs to be run over and over again.


Compile a script

MBS( "Applescript.Compile" ; $Applescript )

See also

Blog Entries

Created 18th August 2014, last changed 31st October 2016

AppleScript.Close - AppleScript.Execute

Feedback: Report problem or ask question.

MBS Xojo Plugins

Start Chat