The script itself has most of the documentation. Just know that there are two scripts here:
- A plain-text version (
.applescript
) - A compiled version (
.scpt
)
The plain text is here so you can actually see the script before downloading.
However, BBEdit will need a compiled version. So either download the .scpt
file and save it to the proper location, or copy the contents of the
.applescript
file, open AppleScript Editor, paste it in a new document, and
save it as a .scpt
in the proper location.
The following script works:
With
Script Editor
save it as a JavaScript script as~/Library/Application Support/BBEdit/Attachment Scripts/Application.applicationWillSwitchOut.scpt
.