All Projects → idleberg → vscode-applescript

idleberg / vscode-applescript

Licence: MIT license
Language syntax and snippets for AppleScript

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

AppleScript for Visual Studio Code

The MIT License GitHub Visual Studio Marketplace CI

Language syntax, snippets and build system for AppleScript and JavaScript for Automation

Screenshot

Screenshot of AppleScript in Visual Studio Code with Hopscotch theme

Installation

Extension Marketplace

Launch Quick Open, paste the following command, and press Enter

ext install idleberg.applescript

CLI

With shell commands installed, you can use the following command to install the extension:

$ code --install-extension idleberg.applescript

Packaged Extension

Download the packaged extension from the the release page and install it from the command-line:

$ code --install-extension path/to/applescript-*.vsix

Alternatively, you can download the packaged extension from the Open VSX Registry or install it using the ovsx command-line tool:

$ ovsx get idleberg.applescript

Usage

Building

On 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
  • JXA: Run Script
  • JXA: Compile Script
  • JXA: Compile Script bundle
  • JXA: Compile Application

Settings

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
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

File Encoding

The default character encoding for AppleScript text files is Mac Roman. If you wish to change this, you can do so in the settings.

Example:

{
  "[applescript]": {
    "files.encoding": "utf16le"
  }
}

License

This work is licensed under The MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].