Script Debugger provides clippings corresponding to all commonly used AppleScript control structures, and you can add your own clippings. Clippings are text files in ~/Library/Application Support/Script Debugger 5/Clippings; you are free to add text files here.
The name of a clipping file (stripped of its file extension suffix) is the name of the clipping, and clippings appear in alphabetical order in the Clippings menu and clippings inspector. To allow modification of this order, the following rules apply:
A file will appear as a menu item. A folder will appear as a hierarchical menu, and the files inside it will be its menu items. The name of a file (or folder) is the name that will appear in the menu, except that certain names or part-names are hidden and used for determining the order of the menu, as follows:
If a name starts with the prefix ##)
, where ##
is a two-digit number (00-99), these digits are used to determine the position of this item in the menu and the prefix does not appear in the menu item’s name.
A name ##)-***
will appear as a menu separator, again with its order determined by the two-digit number ##
.
To edit a clipping:
Choose it from the Clippings menu, or double-click it in the clippings inspector, while holding down the Option key.
Or, click the select the clipping in the clippings inspector and click Edit Clipping.
To reveal a clipping file in the Finder:
Choose it from the Clippings menu, or double-click it in the clippings inspector, while holding down the Shift key.
Or, in the clippings inspector, select the clipping and choose Reveal in Finder from the contextual menu.
A clipping’s text is pasted literally into your script, except for the following expansion tags which are interpreted intelligently:
#~...~#
; behind the scenes, that’s what a placeholder’s text really looks like in a script.mm/dd/yy hh:mm:ss
) will be used./bin/bash
. Anything in double brackets that doesn’t match one of the preceding tag types is taken to be the name of an environment variable. If there is no matching environment variable name, the tag is left unchanged; for example, [[howdy]] becomes [[howdy]]
.