https://github.com/idleberg/sublime-applescript
AppleScript command completions, build system and useful snippets. Supports editing binary scripts
https://github.com/idleberg/sublime-applescript
applescript jxa open-scripting-architecture osacompile osascript sublime-text sublime-text-package
Last synced: 2 months ago
JSON representation
AppleScript command completions, build system and useful snippets. Supports editing binary scripts
- Host: GitHub
- URL: https://github.com/idleberg/sublime-applescript
- Owner: idleberg
- License: mit
- Created: 2014-01-05T18:48:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T20:49:13.000Z (12 months ago)
- Last Synced: 2025-04-27T10:04:31.456Z (2 months ago)
- Topics: applescript, jxa, open-scripting-architecture, osacompile, osascript, sublime-text, sublime-text-package
- Language: Python
- Homepage:
- Size: 1.58 MB
- Stars: 59
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AppleScript Extensions for Sublime Text
[](LICENSE)
[](https://github.com/idleberg/sublime-applescript/releases)
[](https://packagecontrol.io/packages/AppleScript%20Extensions)This [Sublime Text](http://www.sublimetext.com/) package adds completions, snippets and build tools for [AppleScript](https://developer.apple.com/library/mac/documentation/applescript/conceptual/applescriptlangguide/introduction/ASLR_intro.html) (including binary files) and JavaScript for Automation (JXA).

*Screenshot of AppleScript in Sublime Text with [Hopscotch](https://github.com/idleberg/Hopscotch) color scheme*
## Installation
### Package Control
1. Make sure you already have [Package Control](https://packagecontrol.io/) installed
2. Choose “*Install Package*” from the Command Palette (Super+Shift+p)
3. Select “*AppleScript Extensions*”” and press Enter### Using Git
1. Change to your Sublime Text `Packages` directory
2. Clone repository `git clone https://github.com/idleberg/sublime-applescript.git 'AppleScript Extensions'`### Manual installation
1. Download the latest [stable release](https://github.com/idleberg/sublime-applescript/releases)
2. Unzip the archive to your Sublime Text `Packages` directory## Usage
### Completions
Many commands can simply be triggered by completing a standard AppleScript command. Commands such as `try`, `if`, `repeat`, or `set` will create a code block. Press Tab to jump between input-fields.
### Snippets
There are several snippets included to generate license-texts enclosed in a comment. To trigger these, try the `license` command with license names as parameter. You could, for example, use `license:mit` to add an *MIT License* text, or `license:gpl2` for the *GNU General Public License* in version 2.0. Press Tab to jump between input-fields.
You can directly address several macOS applications to have them perform some action. For instance you can scaffold a script using `Mail:Send message`, telling Mail to send a message. You can use Tab to jump between recipient, subject and message fields. Other examples would be `System Preferences:Security` to open the according panel in System Preferences, or `iTunes:Open file` to play a piece of music in iTunes.
More examples:
* `Calendar:Add event`
* `Finder:Open location`
* `OS:Notification Message`
* `Safari:Open location`
* `Terminal:Run shell script`### Build System
Build systems are available on macOS to compile or run scripts. Use the default shortcut ⌘+B to build or Shift+⌘+B to select a build system variant.
**Note:** When editing binary AppleScripts decompiled by this package, you can simply save the file for it to be re-compiled. Building it will lead to undesired results.
## License
This work is licensed under the [The MIT License](LICENSE).