Real World Adobe Creative Suite 2

One of the simplest ways to automate your work and reduce drudgery is to record actions for a repetitious series of commands in either Photoshop or Illustrator. These actions can then be played back on one or more files. (In another application, these actions might be called macros.) Both applications come with some premade actions that can be useful as is, but you can also examine them to help you create actions of your own. Actions are so easy to make that anyone can use them to handle some of the mindless activities that can take up much of our time.

Both Photoshop and Illustrator create and manage actions with an Actions palette that is virtually identical (Figure 15-1). (ImageReady also has an Actions palette that has some differences. You can read about that in Photoshop Help in the Adobe Help Center.) In both applications, choose Window > Actions to open the palette.

Figure 15-1. Actions palette (Photoshop shown).

Tip: Try Out the Prebuilt Actions

You may find some useful actions already included with Photoshop and Illustrator. For example, Illustrator has a useful action to delete unused palette items, which removes unused colors, patterns, and brushes, and can reduce your file sizes. Photoshop, by default, lists only the action set called Default Actions in the Actions palette, but at the bottom of the Actions palette menu lists many other useful action sets. Just select the sets called Commands, Frames, etc. to display them.

Recording and Running an Action

Let's imagine that we'd like to automate the task we described at the beginning of the chapterresizing a large number of images to a standard size, converting them to CMYK, and saving them in a different file format. How could we create an action to do that?

Recording an action is quite easy. Remember that you can take as much time as you like when it's being recorded, and you can always edit the action later on if you make a mistake. Here are the steps:

1.

Open a file on which you want to record an action.

2.

Click the Create New Action button on the Actions palette. Give the new action a name (we called it Resample, CMYK & Save) and choose an action set for it to be stored in from the Set menu (Figure 15-2). If you like, you can also give it a keyboard shortcut, and even a colorwhich applies only in Button mode. (We discuss actions sets and Button mode in the "Managing Actions" section below.) When you click Record or press Return/Enter, the application begins recording the sequence of your operations.

Figure 15-2. New Action dialog box.

3.

Perform the operations you want the action to include. The Record button turns red, indicating the steps are being recorded. (In the simple example we're working on, we would choose Image > Image Size and set the options for resizing a sample image; choose Image > Mode > CMYK Color to convert to CMYK mode; and save the file in the Photoshop (PSD) format.)

4.

When you're finished, click the Stop Playing/Recording button.

Playing Back Actions

To play back an action, open an appropriate file. Select the name of the action in the Actions palette, and click the Play Selection button, or press the keyboard shortcut if you created one. You can also play back part of an action by selecting the command where you want to begin in the palette, and clicking the button.

Keep in mind that when playing back an action, the results will depend on the current application settings, and the active layer and foreground/background color (Photoshop) or the current fill and stroke color (Illustrator).

If the action doesn't play back correctly, it may be that Photoshop or Illustrator couldn't record a step (see the next section).

Tip: Save a Snapshot or Work on a Copy

If you're recording a longer action, you may not be able to undo back to the original file, if you make a mistake. In Photoshop, save a snapshot by choosing Save Snapshot from the History palette menu before you start recording. Illustrator has no History palette, so work on a copy of your file.

Editing Actions

Take it slow and easy, and you may be able to create an action right the first time. But if you don't, you can always edit and correct the action later on. Here are some ways you can edit an action:

  • Examine the commands in an action by clicking the triangle to the left of the command name to see the steps and settings.

  • Toggle a command within an action by selecting the command and clicking in the checkbox column to the left of the name to turn it off or on.

  • Add more commands to the end of an action by selecting the action in the Actions palette and clicking the Begin Recording button. Then start applying commands you want to record. When you finish, click the Stop Playing/Recording button.

  • Move a command within an action by dragging it up and down in the list. Duplicate a command by Option/Alt-dragging iteven from another action.

  • Change a setting within a command by double-clicking a command name to open a dialog box (if there are settings for the command). Here you can change the setting, and press Return/Enter to close the dialog box. (If you click the Toggles Modal Control column beside the commandadding an embossed square iconthe action pauses when played so the user can specify values in a dialog box.)

  • Delete a command by selecting its name and pressing the Delete Selection button.

As you get more experience creating and editing actions, here are a few hints that may help you build more useful and sophisticated actions:

  • Not all actions can be recorded. While most commands and tool operations can be recorded, some cannot. Watch the Actions palette for commands that don't appear. In Photoshop, nonrecordable actions include using the painting and toning tools and View and Window menu commands. In Illustrator, nonrecordable actions include using the Selection, Pen, Paintbrush, Pencil, Gradient, Mesh, Eyedropper, Paint Bucket, and Scissors tools and View and Effects menu commands.

  • You can insert a stop to perform an operation that cannot be recorded, such as painting. Select a command to insert a stop after that command. Then choose Insert Stop from the Actions palette menu (Figure 15-3). Type a message you'd like to appear. Don't check Allow Continue, and click OK. Now when the action is played, the action will stop at that point. After a user clicks OK in the message dialog box, he or she can add a painting operation, for example, and continue the action by selecting the next command, and pressing the Play Current Selection button. You can also use a stop to insert a warning to the user. Check Allow Continue in the dialog box if you want the application to continue the action after the user clicks OK.

    Figure 15-3. Record a stop by selecting Insert Stop from the Actions palette menu.

  • You can insert a menu item for an action that cannot be recorded, such as View > Rulers. Select a command to insert the item after that command. Then choose Insert Menu Item from the Actions palette menu. With the Insert Menu Item dialog box open, select a command from its menu, and click OK.

  • Don't assume that a file includes a particular layer or channel (Photoshop). Avoid referring to layers or channels by name unless the action has created them.

  • Don't assume that you're in a particular image mode. Some filters only act on RGB images, for example.

Tip: Look for Other Actions

In addition to the prebuilt actions that come with Photoshop and Illustrator, you can look for actions which other people have created and shared. One good source is the Adobe Studio Exchange (see the Appendix, "Creative Suite Resources" for more details).

Managing actions

Both Photoshop and Illustrator store actions in action sets. You can create a new set by clicking the Create New Set button on the Actions palette or delete a set by selecting it and pressing the Delete Selection button. To rename a set, double-click its name.

You can move actions between sets by dragging them. To show and hide the actions within a set, click the triangle beside their names.

You can save and load action sets by choosing Save Actions or Load Actions from the Actions palette menu. Photoshop stores its saved action sets in this location: Applications > Photoshop CS2 > Presets > Photoshop Actions. Illustrator stores its saved action sets here: Applications > Illustrator CS2 > Presets > Actions.

Tip: Save Your Actions in Sets

Actions are stored by default in the application's preferences. If your preferences are reset, you will lose them. To save them, you must save the action set they are in (you cannot save a single action).

You can also use the Actions palette menu to choose the commands Reset Actions (returning the Actions palette to default settings), Replace Actions (removing all sets and replacing them with a single set you choose), or Clear All Actions.

If you'd prefer to display each action as a button (we don't, because all you can see is the button's name, and not its commands), you can choose Button mode from the Actions palette menu.

Different Kinds of Actions

If you're in Acrobat or GoLive, you may see references to "actions," but they're not the same kind we're talking about in this chapter.

In Acrobat, you can make PDF files interactive (see "Adding Interactivity to PDF Files" in Chapter 14, "Creating and Using PDF Files"). When you make links, bookmarks, or buttons interactive, you can assign actions to the object. For example, you might make a button to turn to the next page in the PDF file. But these actions are not recorded in the same way we describe here.

GoLive also has JavaScript Actions, which are bits of JavaScript code used to create dramatic page effects like mouse-overs and pop-up windows. These are also different than actions created with the Actions palette.

Категории