Important
JXA support has been moved to a separate extension. Please refer to the deprecation notice for details.
Language syntax, snippets and build system for AppleScript.
Launch Quick Open, paste the following command, and press Enter
ext install idleberg.applescript
With shell commands installed, you can use the following command to install the extension:
$ code --install-extension idleberg.applescript
Download the packaged extension from the release page and install it from the command line:
$ code --install-extension path/to/applescript-*.vsixAlternatively, you can download the packaged extension from the
Open VSX Registry or install it using the
ovsx command-line tool:
$ ovsx get idleberg.applescriptOn macOS, you can make use of the following build commands through the command-palette:
- AppleScript: Run Script – Shift ⇧+Option ⌥+R
- AppleScript: Compile Script – Shift ⇧+Option ⌥+B
- AppleScript: Compile Script bundle
- AppleScript: Compile Application
You can tweak the defaults for this package, osacompile and osascript in the
package settings.
| Setting | Default | Description |
|---|---|---|
showNotifications |
true |
Show build notifications indicating success or failure |
alwaysShowOutput |
false |
Specify whether to show the output panel on errors only or on each build |
convertErrorRange |
false |
Convert error range to line/column |
defaultBuildTask |
"script" |
Specify the default build task when creating a new task file |
allowMultiTermination |
false |
Allows the selection of multiple processes to be terminated |
osacompile.executeOnly |
false |
Save the resulting script as execute-only |
osacompile.stayOpen |
false |
Stay open after run handler |
osacompile.startupScreen |
false |
Show startup-screen |
osascript.outputStyle |
- | The flags argument is a string consisting of any of the modifier characters e, h, o, and s |
In prior versions of macOS, the default character encoding for AppleScript text files was Mac Roman; it is now UTF-8.
You can tweak the default file encoding in your Visual Studio Code settings.
Example:
{
"[applescript]": {
"files.encoding": "macroman"
}
}This work is licensed under The MIT License.
