The Clip window

You can store frequently used code fragments in the Clip window. You copy text to the Clip window to save it and then drag or copy this text to the appropriate Script view or editor when you want to use it.

Using the Clip window

The Clip window displays a list of named clips and a preview of the information contained in each clip. It provides buttons to move Clip window contents to the clipboard, copy clipboard contents to the Clip window, rename a clip, and delete a clip. Clips you save in one workspace are available in all your workspaces; you might want to use a naming convention that reflects this.

For example, you might have standard error-checking code that you want to reuse on a regular basis. You can copy it to the clipboard by highlighting the code in Script view and selecting Copy from the pop-up menu. In the Clip window, click the Paste icon, and name the clip.

You can drag a clip from the Clip window to any script to which you want to add it. You can also use the Copy icon to copy the clip to the clipboard.

You can hide or display the Clip window by using the Clip Window button on the PowerBar or selecting Window>Clip.

Figure 1-4: Clip window with three clip entries

The sample shows the Clip window. At top left are buttons to move Clip window contents to the clipboard, copy them  to the Clip window, rename a clip, delete a clip, and modify the clip’s description. Below this are three columns. The Name column lists three named clips, the Preview column shows some information contained in each clip, and the Description column (not shown) explains what the clip does.