Clippings are bits of boilerplate text that you can insert into your code. Clippings are accessed from within Script Debugger in two mainplaces:
The Clippings menu ().
The clippings inspector. It is in the Inspectors tab of a script window. To see the clippings inspector:
Choose View > Inspectors Tab.
Or, click the Inspectors button in the script window toolbar.
You can insert a clipping into your script in any of the following ways:
Choose it from the Clippings menu.
Control-click in a script window’s text area and choose Paste Clipping from the contextual menu. The hierarchical menu contains the same clippings as the Clippings menu.
In the clippings inspector, double-click a clipping.
In the clippings inspector, select a clipping and click Paste Clipping.
The tooltip for a Clippings menu item or clippings inspector item is the content of the clipping (hover the mouse over the clipping’s name to see it).
A clipping can wrap the current selection. This allows you to incorporate existing text in your script into the heart of the clipping as the clipping is inserted.
For example, you might realize that part of your script needs to be repeated, so you’d like to wrap it in a repeat block. Select the text and then choose a repeat block clipping, such as “repeat n times”. A repeat block is inserted, wrapped around the text that you selected.
A clipping can include placeholders. A placeholder is displayed (in an uncompiled script) as a stretch of text in an oval-shaped “cartouche”. The idea is that you can easily select an entire placeholder, and type or paste to replace it with the desired text.
To select a placeholder:
Press Tab. Each time you press Tab, the selection cycles to the next placeholder. (Alternatively, press Shift-Tab to cycle in reverse order.)
Or, choose Edit > Go to Next Placeholder or Edit > Go to Previous Placeholder.
Or, click on the placeholder. The entire placeholder is selected.
Placeholders that you don’t edit are replaced by normal text when you compile your script. Or, to replace a placeholder with normal text immediately:
If you’re interested in creating your own clippings, read on.