22. Actions

Image

To automate repetitive (and boring) editing tasks, you can record a sequence of commands in an action and then replay the action on one image or on a batch of images.

Actions can be used to execute anything from a simple edit, such as converting files to a different format or color mode, to a complex sequence of commands, such as applying a series of adjustments or filters or a sequence of preflight steps to ready your files for output. With actions, you can boost your productivity, relieve your life of (some) drudgery, and standardize your editing steps. Photoshop ships with dozens of ready-made actions, some of which you may find useful. In this chapter, you’ll learn how to record, play, and edit custom actions, and how to save and load action sets.

Recording an action

Using the Actions panel, Image you can record, store, edit, play, delete, save, and load actions. The panel has two modes: List (edit) A and Button (A, page 397). When the panel is in List mode, you can expand or collapse the list of commands in an action; toggle a dialog control on or off; add, exclude, delete, rerecord, or change the order of commands; or save actions and action sets to an actions file. To put the panel into List mode, uncheck Button Mode on the panel menu.

Image

A This Actions panel is in List mode.

Each command that is recorded in an action is nested below the action name on the Actions panel. Actions, in turn, are stored in sets. Note: To learn how to include edits in an action that aren’t directly recordable, see pages 401402.

To record an action

1. The action you’re about to record has to be stored in a set. To create a set, click the New Set button Image at the bottom of the Actions panel, type a descriptive Name, then click OK.

2. Open a document or create a new one. We recommend copying the document using File > Save As.

3. Click the New Action button Image at the bottom of the Actions panel.

4. In the New Action dialog, enter a Name for the action, and from the Set menu, choose a set (either the one you created in step 1 or a different one).A

Image

A Use the New Action dialog to assign a name and set to your action, as well as an optional function key and/or color, and begin recording.

5. Optional: Choose a shortcut from the Function Key menu, and check Shift and/or Command to prevent conflicts with the function keys that are assigned to system commands. Choose a color to display when the panel is in Button mode.

6. Click Record.

7. We recommend as a first step that you create a snapshot of the current state of the document on the History panel. Next, execute the commands that you want to record, as you would normally apply them to any image. Any time you enter values in a dialog and click OK, your settings will be recorded (unless you click Cancel).

8. When you’re done recording edits for the action, click the Stop Playing/Recording button. Image

9. The new action will appear on the panel.

• If you create layers or alpha channels while recording an action, assign them descriptive, nongeneric names to prevent the wrong layer or channel from being edited when the action is played.

• When recording the Save As command in an action, be especially careful not to enter a specific file name, or that file will be overwritten when the action is played. Either avoid entering a name or add a modal control to have the action pause at the Save As command (see page 403).

• To reopen the Action Options dialog, in which you can change an assigned shortcut or color, double-click the action listing.

Playing an action

An action can be triggered in various ways: via the Play button on the Actions panel; via a keyboard shortcut that was assigned to it; by dragging a file or folder full of files onto a droplet icon that was made from the action; or by using the Batch feature. We’ll begin with the Play button and shortcuts.

To play an action on one image

1. Open an image and click an image layer.

2. Optional: If the action to be played doesn’t include creation of a snapshot as an initial step, use the History panel to do so now, to preserve the option to restore the document to its pre-action state.

3. Do one of the following:

If the Actions panel is in List mode, click an action name, then click the Play button. Image

If the panel is in Button mode, click the button for the action to be played.A

Image

A When the Actions panel is in Button mode, each action is listed as a colored button. Assigned shortcuts, if any, are also listed.

Execute the keyboard shortcut, if one has been assigned to the desired action.

• To play an action starting from a specific command in the action, put the panel in List mode, click the command name, then click the Play button. Or to play just one command in an action, click the command name, then Ctrl-click/Cmd-click the Play button; or simply Ctrl-double-click/Cmd-double-click the command.

• If the Actions panel is in List mode, you can click the arrowhead next to an action name to expand or collapse its list of commands.

• To load other action set libraries onto the panel, see page 404.

To exclude a command from playback

1. Put the Actions panel in List mode (actions can’t be edited in Button mode).

2. Expand the list for the action to be edited.

3. Click in the leftmost column for the command that you want to exclude from playback, to remove the check mark.B The check mark for the main action listing turns red. (To reinclude the command, click in the same column again.)

Image

B To exclude a color change in our “brush shape” action from playback temporarily, we unchecked that step.

Note: If you click the check mark for an entire action or action set, as an alert will inform you, Photoshop will recheck any commands that you had unchecked individually.

The ability to play an action on multiple files is a great timesaver. This can be done quickly by dragging a folder of files onto a droplet (see “To create a droplet for an action” on page 400). Or if you need to choose a destination, a file-naming scheme, and other options for the files to be processed by the action, use the Batch command instead, as described on this page.

To play an action on a batch of images

1. Do either of the following:

In Bridge, put all the files to be processed into one folder and display the folder contents (or to limit which images are to be processed, select those thumbnails), then choose Tools > Photoshop > Batch.

In Mini Bridge, click a folder listing to display its contents (or to limit which images are to be processed, select specific thumbnails). Right-click a thumbnail, then choose Photoshop > Batch. Image

2. The Batch dialog opens (A, next page). Under Play, choose an action set from the Set menu and an action from the Action menu.

Image

A In the Batch dialog, choose an Action to be played, choose Bridge as the source, specify a Destination for the processed files, and choose optional File Naming settings.

3. For the Source, choose Bridge.

4. Optional: If the action contains an Open command, check Override Action “Open” Commands to have the batch command ignore the specific file name that was chosen when the Open step was recorded.

5. Check Suppress File Open Options Dialogs and/or Suppress Color Profile Warnings to prevent those dialogs or alerts from appearing onscreen as source files are opened.

6. From the Destination menu, choose one of the following options:

None to keep all the files open after processing.

Save and Close to have the files save after processing and then close.

Folder to have the files save to a new folder and to make the File Naming options for naming the resulting files accessible (the naming options prevent the new files from replacing the original ones). Click Browse/Choose, choose a destination folder, then click Browse/Choose again.

Optional: If the action contains a Save As command, you should check Override Action “Save As” Commands to have the save process in the batch command ignore the name and location that was recorded in the action.

7. If you chose Folder as the Destination, you can do the following:

Choose options from the menus in the File Naming area, or type text to be included in the name. Note the Example to verify your naming convention choice.

If you chose a naming option that uses sequential (serial) numbers, enter a one- to four-digit starting number in the Starting Serial # field.

Check any or all of the file name Compatibility options for the platforms you need the files to be compatible with.

8. Optional: By default, Photoshop will stop the Batch process if it encounters an error. To have it play the whole action and keep track of error messages in a text file instead, from the Errors menu, choose Log Errors to File, then click Save As. In the Save dialog, type a name for the text file (keep the extension), choose a location for it, then click Save. If errors are encountered, you will be alerted via a prompt that errors were logged into the designated error log file.

9. Click OK to start the batch processing.

• You can also play an action on a batch of images via the Image Processor command (File > Scripts submenu in Photoshop, or Tools > Photoshop submenu in Bridge). In the dialog, check Run Action, then choose an action set and an action from the menus.

• When you play an action on an image, the action steps are listed as states on the History panel.

• To stop the batch command while it’s processing, press Esc.

An action can be turned into its own little mini-app, called a droplet, that sits on the Desktop or in a folder, waiting to be triggered.A If you drag a file or a folder full of files onto a droplet icon, Photoshop will launch (if it’s not yet running), and the action that the droplet represents will be played on those files. Droplets can be shared among Photoshop users.

Image

A This is a droplet icon for an action.

To create a droplet for an action

1. Choose File > Automate > Create Droplet. The Create Droplet dialog opens.B

Image

B Use the Create Droplet dialog to choose a location and other options for your action droplet.

2. Click Choose. The Save dialog opens. Enter a name in the Save As field (keep the extension), choose a convenient location for the droplet, then click Save.

3. In the Create Droplet dialog, choose an action set from the Set menu, then an Action to be saved as a droplet.

4. Check any Play options to be included in the droplet, and choose Destination and Errors options for the processed files (see steps 4–8 on page 398).

5. Click OK. The droplet will appear in the designated location.

6. To use the droplet, drag a file or a folder full of files onto it. The action plays on the files.

Editing an action

If you want to experiment with an action or add to it without messing around with the original, duplicate it, then edit the duplicate. (Also remember to save your action sets to a file, as described on page 404.)

To duplicate an action

Do either of the following:

Click an action, then choose Duplicate from the Actions panel menu.

Drag an action over the New Action button Image on the Actions panel.

• To rename an action, double-click the name.

When you insert a Stop in an action, the playback will pause at that point so the user can perform a manual or nonrecordable edit (e.g., choose a source point for a cloning tool or create a selection at a specific size and location). You can also include an instructional message for the user, which will appear in an alert dialog when the pause occurs, such as a directive to use a tool in a specific way or to choose specific panel settings. After completing the manual edit, the user resumes the playback by clicking the Play button.

To insert a Stop in an action

1. Do either of the following:

While recording an action, pause at the point at which you want the Stop to appear.

To add a Stop to an existing action, on the Actions panel, click the command name after which you want it to appear.

2. Choose Insert Stop from the Actions panel menu.

3. In the Record Stop dialog, type an instructional or alert message.A We recommend also spelling out in the message that after clicking Stop and performing the desired edit, the user should click the Play button to continue the playback.

Image

A In the Record Stop dialog, we typed an instructional message for the user. We also checked Allow Continue to add a Continue button to the alert dialog, which will appear when the action is played.

4. Optional: Check Allow Continue to include a Continue button in the alert dialog (in addition to a Stop button). If the user opts not to perform the requested manual edits, he or she can click Continue to resume the playback (instead of having to click Stop, then click the Play button on the panel). Don’t check Allow Continue if the requested manual edit is essential to the user’s execution of the remaining steps in the action (e.g., the creation and positioning of a selection).

5. Click OK. The Stop listing will appear below the command you paused after or clicked in step 1.B–C

Image

B The Stop command appeared as a step within the action.

Image

C When we played the action on an image, our instructional message and a Continue button appeared in this alert.

Perhaps you neglected to include a particular menu command when you initially recorded an action. The Insert Menu Item command gives you a second chance. Also, some menu commands (e.g., on the View or Window menu) can’t be included when an action is initially recorded. Using this feature, you can insert those commands afterward.

To insert a menu item in an action

1. Expand the listing for an existing action, then click the command after which you want the new menu command to be inserted.

2. From the Actions panel menu, choose Insert Menu Item. The Insert Menu Item dialog opens.

3. From the Photoshop menu bar, choose the command to be added to the action. The command name appears in the Insert Menu Item dialog.A

Image

A When we chose the Fill command from the Edit menu, the command name appeared automatically in the Insert Menu Item dialog.

4. Click OK.B

Image

B The menu item that we inserted appeared as a listing within the action on the Actions panel.

5. If the menu command that you inserted requires user input in a dialog, you will need to add a modal control to the action for that command. See the first task on the next page.

If you forgot to include a particular command or editing step in an action, or you want to improve an action by adding a command, here’s your second opportunity.

To add a command or edit to an action

1. On the Actions panel, expand the list that you want to add an edit to, then click the command name after which you want the new edit to appear.

2. Click the Begin Recording button. Image

3. Execute the desired command(s). Note: You can’t add a command that’s available only under certain conditions (e.g., the Feather command, which requires an active selection) unless the creation of those conditions is also included as steps in the action.

4. Click the Stop Playing/Recording button. Image

• To expand or collapse all the steps that are nested within an action, Alt-click/Option-click the arrowhead next to the action name.

You can enable a modal control, or pause, for any step in an action that enables user input, such as a dialog in which they choose settings or an edit that requires pressing Enter/Return in order to be executed (such as a transform command).

To add a modal control to a command in an action

1. Put the Actions panel in List mode, and expand the list for an action.

2. For any individual listing within the action, click in the second column; the Dialog icon Image appears.A

Image

A Via the Dialog icon, you give the user an opportunity to enter different settings in a dialog when it opens during playback.

When the action is played, it will pause when it encounters a command that has a modal control, and the dialog or on-image controls will appear onscreen. In the case of a dialog, the user can enter new values, accept the original recorded settings by clicking OK, or click Cancel. When the user exits the dialog or commits to the edit, the playback continues automatically.

• To toggle a modal control off or on, click the Dialog icon.

To enable or disable all modal controls for an action

Click in the Dialog column for an action name. Depending on their current state, all the modal controls in the action will be turned on or off.

Note: A short horizontal line in the Dialog icon ImageImage for an action listing indicates that the modal controls in the action are in a mixed state (some off and some on). To reset the modal controls to their original state, click the Dialog icon; if an alert prompt appears, click OK.

To rerecord an action using different dialog settings

1. Click the name of the action that contains the settings to be edited.

2. From the Actions panel menu, choose Record Again.

3. The action will play back, stopping at each command that uses a dialog. Enter new settings where needed, then click OK. Each time you close a dialog, the rerecording continues.

4. To stop the rerecording, either click Cancel in a dialog or click the Stop Playing/Recording button Image on the panel.

To change the settings for a command in an action

1. On the Actions panel, expand the listing for an action, then double-click a command that uses a dialog (or alert dialog) for which you want to change the settings.

2. Enter new settings.

3. Click OK. (Click Cancel to cancel your revisions.)

This may seem obvious, but remember that if you change the order of edits in an action, the revised action may produce different results than the original.

To change the order of edits in an action

1. On the Actions panel, expand the list for an action, if it’s not already expanded.

2. Drag a command upward or downward on the list.

Deleting commands and actions

You can delete a whole action, or just delete individual commands.

To delete an action or delete a command from an action

1. If you created (or edited) any custom action sets that you want to preserve for future use, follow the steps in “To save an action set to a file,” at right.

2. On the Actions panel, do either of the following:

Click the action to be deleted.

Click the individual command to be deleted. Ctrl-click/Cmd-click to highlight additional commands, if desired.

3. Click the Delete button, Image then click OK (or to bypass the prompt, Alt-click/Option-click the Delete button).

Saving and loading action sets

Be sure to save any custom or edited action sets that you want to preserve for future use — and potentially share with other Photoshop users.

To save an action set to a file

1. On the Actions panel, click the action set to be saved.

2. Choose Save Actions from the panel menu.

3. In the Save dialog, type a name for the action set file, keep the extension and default location, then click Save. Each file is regarded as one set, regardless of how many actions it contains.

4. When you relaunch Photoshop, your newly saved set will appear on the Actions panel menu. Note: If you edit any actions in the set, you will need to resave the set by following the steps above.

Photoshop includes many useful actions beyond those in the default set. To load them on the panel, or to load any user-created set, follow the instructions below.

To load a set onto the Actions panel

1. On the Actions panel, click the set name that you want the loaded set to appear below.

2. From the Actions panel menu, choose a predefined action set (Commands, Frames, Image Effects, LAB–Black & White Technique, Production, Stars Trails, Text Effects, Textures, or Video Actions), or a user-saved set.

To reload the default action set

From the Actions panel menu, choose Reset Actions. In the alert dialog, click Append to add the default set to the existing sets on the panel, or click OK to replace the existing sets with the default one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset