15. Automating Your Work with Actions

Introduction

Actions are only one of the Adobe Photoshop Automate commands; however, they’re so important to consistency and efficiency, they deserve their own chapter. Actions are Photoshop’s way of relieving you of the mind-numbing task of repeating an operation over and over again. For example, you’re recovering 55 images from your digital camera, and each image needs to be converted to a specific size and resolution. Instead of repeating the conversion process 55 times, you perform the conversion process once, and save it as a repeatable action.

Actions are similar to recording information on a tape; they record Photoshop commands and, like a tape recorder, can be played back at any time. Actions can be applied to any number of images. You can modify existing actions, and save them into a user-defined set. It’s even possible to save them and send them to another Photoshop user. In Photoshop, it’s now possible to create an action out of almost any command, filter, or adjustment, including blending mode changes to layers as well as tools, including brush strokes. This chapter is dedicated to all the Photoshop users who are tired of doing something over and over again. If you have ever considered using actions as a part of your design workflow, then you’re in for a wonderful journey of discovery.

You can also enhance your actions by creating a droplet. A droplet is an action that appears as a file on your hard drive. For example, you could create a droplet that performs a generic color correction operation. To perform the operation on a Photoshop document, you would not even have to open Photoshop; you would simply drag the image file over the droplet, and release—the droplet does the rest.

Examining the Actions Panel

The Actions panel is where you create, save, modify, and store all of your actions. The analogy of a tape recorder is often used in describing the Actions panel, and it’s actually a good way to think of actions. The action itself is a recording, and the Actions panel is the tape recorder. When you begin an action, the panel records each step in the process, saves them, and then lets you play them back on another image. In order to record and play actions, you need to understand how to use the Actions panel. Like other panels, you can use the Actions Options to specify action related settings. For example, you can record brush strokes as part of an action with the Allow Tool Recording option on the Actions Options menu.

Examine the Actions Panel

Image Select the Actions panel.

Click the Window menu, and then click Actions or press Alt+F9 (Win) or Option+F9 (Mac).

Image Check the toggle box to toggle an action on or off.

Image Click the dialog box to toggle the dialog function on or off.

Image Click the expand triangle to expand or contract an action or set.

Image Click the Actions Options button to access all of the Actions panel options. Some of the commonly used options include:

Button Mode. Select to allow use actions with 1-click access.

Playback/Record Options. Select to use playback and recording actions.

Insert Options. Select to insert tasks within an action: Insert Menu Item, Insert Stop, Insert Conditional (New!), and Insert Path.

Allow Tool Recording. Select to enable tools, such as brush strokes, to be recorded.

Image

Additional Action Sets. Select to add more actions to the panel: Commands, Frames, Image Effects, LAB, Production, Stars Trails, Text Effects, Textures, and Video Actions.

Image The following buttons are accessible at the bottom of the Actions panel, from left to right:

Stop. Click to stop recording and save an action.

Record. Click to begin recording an action.

Play. Click to begin execution of the selected action.

Create New Set. Creates a new action set.

Sets are like file folders; they store individual actions.

Create New Action. Starts the process of creating a new action.

Delete. Click to delete the selected action or set.

Image
Image

Did You Know?

You can convert your Actions into single-click buttons. Click the Actions Options button, and then click Button Mode. When the Actions panel is in Button Mode, you cannot access or edit the steps in the individual actions. To access the Actions panel, click the Actions Options button, and then click Button Mode to uncheck the option.

You can record customized print settings as part of an action. When you record an action using the Print dialog box, you can capture all aspects of the printed file, including printer, profile, and page size. This way you can have one button printing in an action. You can also do the same with a script.


Building a New Action

Building an action is almost as simple as clicking the record button on a tape recorder. Actions are simply a series of program instructions. When you build an action, you’re instructing Photoshop what to name the action, where to store it, and what shortcut keys, if any, will be used to activate the action. Since an action is simply a record of the work performed on an image, it’s a good idea to plan out what you intend to do, and then build the action. Remember, actions are designed for tasks you plan to do repeatedly. It wouldn’t make sense to create an action for a one-time use.

Build a New Action

Image Open a document.

Image Select the Actions panel.

Image Click the Create New Action button.

Image

Image Enter a name for the action in the Name box.

Image Click the Set list arrow, and then select in which set to save the Action.

Image Click the Function Key list arrow, and then click F1 - F12 to assign your new action to a function key.

Image Select the Shift or Command check boxes to require the pressing of the Shift key, or the Ctrl (Win) or Image (Mac) key in conjunction with the function key.

For example, F1, or Shift+F1, or Ctrl+F1, or Shift+Ctrl+F1.

Image Click the Color list arrow, and then select from the available colors.

Image Click Record to begin creating the action.

Image

Important

If you choose a color for the action, it will only be visible if the actions are viewed in Button Mode.


Recording an Action

Once you’ve planned the steps of your action, it’s a simple matter of clicking the Record button and applying a predetermined set of commands to the image. Photoshop watches you like a hawk, faithfully recording each step in the process. For example, you can record brush strokes as part of an action with the Allow Tool Recording option. Just create and name an action, select a drawing or painting tool, change colors, make your strokes, and then stop recording. When you end the action, Photoshop stores the step-by-step instructions of the action in a file, which is available in the Actions panel whenever you want to use it again. All of your loaded actions are displayed by name in the Actions panel. It’s a simple matter of finding the action you want and clicking the Play button to apply the recorded instructions to another document.

Record an Action

Image Open a document.

Image Select the Actions panel.

Image Click the Create New Action button.

Image

Image Specify the action settings.

Image Click Record.

Image

Image Edit the image. Each time you perform an edit, such as applying a filter, adjustments, or commands, the operation is listed as a step in the Actions panel.


Important

The Actions panel doesn’t record the time it takes you to perform a command, only that you performed it. So take your time, and work carefully through the process. Creating an action right the first time saves editing hassles later.


Image Click the Stop button on the Actions panel.

The action is saved and listed in the current Action Set.

Image

Adding a Stop to an Action

There are times when you want to make changes to individual files during the playback of an action. For example, you create an action to balance the contrast in an image, and one of the commands you use is a Levels adjustment. Although none of the other commands need user modification during playback, an optimum Levels adjustment is specific to individual images. What you want is the action to perform (automatically) all of the steps, except Levels. When the action reaches the point where the Levels adjustment would be applied, you want the action to stop and let you make changes that are appropriate for that particular image and then move on to complete the rest of the steps when you’ve finalized the Levels adjustment by clicking OK.

Add a Stop to an Action

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action you want to modify.

Image Click the command directly above where you want to place the action.

Image Click the Actions Options button, and then click Insert Stop.

Image Enter a text message associated with the purpose of the stop action.

Image Select the Allow Continue check box to add a Continue button to the stop alert box.

Image Click OK.

Image Click the Play button on the Actions panel to run the action.

Image
Image

Controlling the Playback of a Command

Not all actions are created perfectly. Sooner or later, you’ll work through the process of action building only to find out (after the action is saved), that you forgot a step, or you need to remove or modify an existing step. You might even need to change the order of the commands in the action. Fortunately, Photoshop doesn’t make you recreate the action; all you have to do is modify it. When you create an action, all of the commands execute in the order they appear in the list of action steps. However, it’s possible you might occasionally want to skip one of the steps in the list, without permanently deleting it.

Control the Playback of a Command

Image Open a document.

Image

Image Select the Actions panel.

Image Click the expand triangle of the action you want to modify.

Image Uncheck the command or commands you do not want to execute.

Image Click the Play button on the Actions panel to run the action without executing the unchecked command(s).

Image Recheck the command(s) to return them to executable status.

Image

See Also

See “Working with Batch File Processing” on page 444 for information on applying an action to multiple files at once.


Adding a Command to an Action

Actions are very versatile; in fact, almost anything that can be done to an image can be placed into an action. You might find that as you perform an action, you need to add an additional command. You can do this with ease; that’s why actions are so great to work with. For example, you might create an action to convert an image from the RGB to the CMYK mode, and after you save the action, you decide it would be great to include a Curves adjustment. You don’t have to throw away the previous action and start all over; all you have to do is select where the command will be inserted, restart the action, and perform the new step. The Actions panel is a powerful time-saving tool, and if you forget a step, it’s also a breeze to modify.

Add a Command to an Action

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action to which you want to add the command.

Image Click the command directly above where you want to insert the new command.

Image Click the Actions Options button, and then click Start Recording.

Image

Image Add the additional command by selecting a filter, adjustment, or any other Photoshop option.

Image When you’re finished adding commands, click the Stop button on the Actions panel.

Image

The next time the action is run, the additional command will be performed.

Deleting a Command from an Action

Occasionally, you may want to permanently delete a command from an existing action. If that’s the case, Photoshop makes the process quick and easy. An action consists of a group of steps. As the action executes, each step is completed in the order in which it appears within the action list. No one step is dependent upon another, so if you want to remove a step, it’s a simple process of deletion. Once the command is removed, the action will perform as if the deleted command never existed.

Delete a Command from an Action

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action from which you want to delete the command.


Important

You cannot delete a command from a running action.


Image Click the command you want to delete.

Image

Image Select from three deletion methods:

Drag the command over the Delete button.

Click the command, click the Delete button, and then click OK in the Delete the Selection alert box.

Click the command, and then hold down the Alt (Win) or Option (Mac) key, and then click the Delete button to delete the command without the alert box message.

Image

Working with Modal Controls in an Action

Modal controls are pauses in an action that allow you to modify a command before proceeding. Modal controls are available for every Photoshop command that utilizes a dialog box, or any command that requires the pressing of the Enter/Return key to process the effect. For example, you create an action that utilizes a Levels adjustment, and you want the option to specify a particular Levels adjustment each time the action is run.

Work with Modal Controls

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action you want to modify.

Image Click the second column from the left to activate the Modal Control button.

Image Click an existing modal control button to deactivate the control.

Image Click the Play button on the Actions panel to run the action.

Image

The action stops and lets you control the command.

Image Adjust the image using the related dialog box as needed.

Image Click OK to continue the action.

Image

Changing the Order of Commands in an Action

When an action runs, it performs each command in the order in which it appears in the action list. Since the order in which a filter or adjustment is applied to an image determines the document’s final appearance, it’s important to be able to adjust the order in which the commands are executed. For example, if you create an action that contains a Curves adjustment followed by a Gaussian Blur filter, and you move the Gaussian Blur filter above the Curves adjustment, it will totally change the look of the final image. The Actions panel gives you the ability to change the order in which commands are executed so that you will be in control of the end result.

Change the Order of Commands

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action you want to change.

Image Drag the command you want to change up or down in the actions stack.

Image

Image Release the mouse when you see a dark line underneath the command where you want the dragged one to be placed.

Image

Did You Know?

You can choose the speed at which an action executes when you’re playing it. Click the Actions Options button, and then click Playback Options. Click Accelerated, Step By Step, or Pause For a predetermined number of seconds. Clicking a slower speed lets you view each step, and is useful when performing editing on an action.


Copying an Action

What if you create an action with several commands, and you need a similar, but not identical, action? Perhaps you have made an action that performs several commands and ends with the Curves adjustment. Then you find you need a new action that performs the same initial commands but ends with the Levels adjustment. If that’s the case, there is no need to reinvent the wheel; just create the first action, make a copy, and then modify the copy.

Copy an Action

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action you want to change.

Image

Image Select how you want to duplicate the action:

Drag the action over the Create New Action button on the Actions panel.

Select the action, click the Actions Options button, and then click Duplicate.

Image

Running an Action Inside an Action

You can make an action run within another action, thus reducing action complexity. For example, you could create an action that performs a dozen or more commands (it’s not unusual), or you could create two simpler actions, and have one action load and run the other action. That way, when it comes time to modify the action, you have a smaller list of commands to deal with. You can also call actions from more than one source, giving you the ability to create small action codes that can be used over and over again.

Run an Action Inside an Action

Image Open a document.

Image Select the Actions panel.

Image Click the expand triangle of the action you want to modify.

Image Click the command directly above where you want to insert the run step for the other action.

Image

Image Click the Record button.

Image Click the action to be added.

Image

Image Click the Play button to record the second action into the first action.

Image Click the Stop button.

Image

The second action is recorded inside the first action.


Important

When you click the Play button, the action executes on the active document, so you might want to perform this on a duplicate image.


Setting a Condition in an Action

A condition allows you to create an action based on different conditions. If you’re a programmer, it’s like an If-Then-Else statement for actions. To create a conditional action (New!), you start the conditional action where you want it, choose the condition you want to trigger the action (the If part), and then you specify an action from the list in the Actions panel that plays when the condition is met (the Then part) and another one when the condition is not met (the Else part).

Set a Condition in an Action

Image Open a document.

Image Select the Actions panel.

Image Click an action, and then click the expand triangle.

Image Click the name of the action to insert the item at the end of the action, or click a specific action step to insert the item after the selected step.

Image Click the Actions Options button, and then click Insert Conditional.

Image

Image Click the If Current list arrow, and then select a conditional option.

Image Click the Then Play Action list arrow, and then select an action from the list in the Actions panel.

Image Click the Else Play Action list arrow, and then select an action from the list in the Actions panel.

Image Click OK.

Image

The conditional action is added to the action steps.

Image

Inserting a Non-Recordable Command into an Action

When you create an action, there are some commands that can not be recorded, such as View and Window commands. However, you can insert many non-recordable commands into an action by using an Insert Menu Item command. The Insert Menu Item command can be used when recording an action or after it has been recorded. Inserted commands do not execute until the action is played, so the file remains unchanged when the command is inserted. This gives you the ability to experiment with different non-recordable commands without the risk of damaging a valuable image.

Insert a Non-Recordable Command into an Action

Image Select the Actions panel.

Image

Image Click an action, and then click the expand triangle.

Image Click the name of the action to insert the item at the end of the action, or click a specific action step to insert the item after the selected step.

Image Click the Actions Options button, and then click Insert Menu Item.

Image

Image Select a command from the available options (the command is selected by clicking and selecting an item from Photoshop’s drop-down menu system).

Image Click OK.

Image

The non-recordable command is added to the action steps.


Important

When you use the Insert Menu Item command for a command that opens a dialog box, you cannot disable the modal control in the Actions panel.


Moving and Copying Actions Between Sets

Once you’ve created an action set, it’s a simple matter to organize all of your time-saving actions. Think of an action set as a file drawer. When you need a specific action, you expand the set, and then locate the proper action. You might want to create sets with names such as Color Correction or Special Effects, for easier retrieval. Then you can create new actions, or move existing actions, into your organized sets. Once the perfect action set is created it can be saved, and even e-mailed to other Photoshop users.

Move and Copy Actions Between Sets

Image Select the Actions panel.

Image Click a preexisting set, and then click the expand triangle to open the set.

Image Use the following move or copy method:

To move an action, drag the action from one set to another.

To copy an action, hold down the Alt (Win) or Option (Mac) key, and then drag the action from one set to another.

Image

Image Release when your mouse hovers over the set into which you want to move or copy the selected set.

Image

Saving Actions into Sets

Once you discover the advantages of using actions, you’ll be creating actions for all those dull, boring, repetitive tasks, and life inside Photoshop will never be the same again. As the days go on, you’ll see your list of actions growing longer and longer. Sooner or later (probably sooner), you’ll develop so many actions that scrolling down the Actions panel to find your favorite actions becomes a job in itself. The Actions panel can hold as many actions as you need, and it also gives you the ability to organize those actions into sets. Action sets are like file folders; they hold groups of actions. For example, you might have a group of actions that perform image restoration, and another group for color correction. Using the Actions panel, you can create an action set for each different group of actions. Once a set is created, it can be removed from the Actions panel, and reloaded when needed. Action sets can also be distributed to other users.

Save Actions into Sets

Image Open a document.

Image Select the Actions panel.

Image Click the Create New Set button.

Image Enter a name for the new set.

Image Click OK.

Image

The new set is added to the Actions panel.

Image

Saving Actions as Files

When you create a new set of actions, Photoshop displays the actions in the Actions panel, but the actions are not permanently saved to the hard drive. That means if you delete an unsaved action or action set, they will be gone forever. To stop that from happening, you need to save the sets. Not only does this give you the ability to save your precious actions, it lets you share your actions with other Photoshop users. For example, you have a friend who’s having trouble performing color correction to an image. You’d like to help her, but she lives 800 miles away. So you create an action that performs the color correction, save the action as a file, and e-mail her the file. Now, all she has to do is click the Actions Options button, and then click Load Actions. She now has the action to color correct her images.

Save Actions as Files

Image Select the Actions panel.

Image Click the set you want to save.

Image Click the Actions Options button, and then click Save Actions.

Image

Image Enter a name for the action set.

The default name will be the original name of the set.

Image Click the Save In (Win) or Where (Mac) list arrow, and then click where to save the set.

Image Click Save.

Image

The actions file is saved with the ATN extension.


Did You Know?

You can access your new Action Set directly from the Actions dialog box. If you save the new action set in the Photoshop Actions folder, the set appears at the bottom of the Actions Options dialog box.


Running a Built-in or Custom Script

Scripts are useful for repetitive tasks and can be used as a creative tool to streamline tasks that are time consuming and boring. A script is a series of commands that instructs Photoshop to perform a set of specified actions. The actions can call not only Photoshop, but also invoke other applications such as Adobe Illustrator. You can save time by using Photoshop’s built-in enhanced scripts—such as outputting your layers to files, saving Layer Comps as separate pages of an Adobe PDF file, or exporting layers to files—or your own custom-defined ones. To create your own scripts you need a working knowledge of a scripting language like JavaScript, and either a script-editing application or a simple text editor, such as Notepad (Win), TextEdit (Mac) BBEdit or even Microsoft Word. The languages you can use to perform scripting are varied and include Visual Basic, AppleScript, and JavaScript, to name a few. As a matter of fact, the Scripts Events Manager lets you set JavaScript and Photoshop Actions to run automatically when a specified Photoshop event occurs.

Use a Built-in or Custom Script

Image Click the File menu, and then point to Scripts.

Image Click from the available built-in scripts or click Browse to select a custom one.

The script starts to run, executing a series of commands.

Image Specify any options or inputs requested by the script to complete its execution.

Image

See Also

For more information on Enhanced Scripting, open the Photoshop application folder, and then navigate to the Scripting Guide folder for access to several PDF tutorial files and sample scripts.


Enhancing the Process with Droplets

When you apply an action to an image, you open the document in Photoshop, open the Actions panel, select the action, and then click the Play button. While that process is easier than having to redo all the steps in a complicated action, there is a simpler way—create a droplet. Droplets apply Photoshop Actions to your images. They appear as files on your hard drive, or you can organize them within a specific folder. For example, you could create a droplet that performs a generic color correction operation. To perform the operation on a Photoshop document, you would not even have to open Photoshop; simply drag the image file over the droplet and release—the droplet does the rest.

Create a Droplet

Image Click the File menu, point to Automate, and then click Create Droplet.


Important

Droplets are created from existing actions.


Image Click Choose, and then select a location to store the droplet.

Image Click the Set list arrow, and then select from the available sets.

Image Click the Action list arrow, and then select the action you want to convert into a droplet.

Image Select from the available Play options (see table).

Image

Available Play Options

Image

Image Click the Destination list arrow, and then select from the following options:

None. The file remains open after the droplet ends.

Save And Close. The file is resaved (loss of original).

Folder. The file is saved in a new folder (selected by user), with the option of renaming the file and extension.

Image Select from the following File Naming options:

Document Name. Use the original name of the document, or click to choose from various naming schemes, including incrementing the files by a number (001, 002, etc).

Extension. Use the original extension of the document, or click to choose from extension options such as using the date or a sequenced serial number.

Starting Serial Number. If you select to use a serial number, you can select a starting value for the sequence.

Compatibility. Select the check boxes you want from Windows, Mac OS, or Unix or any combination of the three.

Image To create an error log file, click the Errors list arrow, and then click Log Errors To File.

The error log records any problems associated with applying the droplet to the image file.

Image To specify an error log file name and location, click Save As.

Image Click OK.

Image
Image

Using a Droplet

Once you’ve created a droplet, it’s a simple matter to use it to streamline your workload. For example, you’ve created a droplet that converts an image into the grayscale color mode, and reduces the image resolution to 72 ppi. To convert an image file to those specifications, just drag the file and drop it on to the droplet. Droplets are files that hold action instructions. Once a droplet is created, you can store them anywhere that you can store a file. It’s not a bad idea to create file folders that hold specific types of droplets, such as color-correction droplets, or image-enhancement droplets. To use a droplet, it’s as easy as clicking an image file, dragging, and then dropping it over the droplet.

Use a Droplet

Image Open the folder that contains your droplets.

Image

Image Open the folder that contains the image file, or files you need to convert.

Image Drag an image file directly over the droplet, and then release.

Image

Photoshop automatically opens and applies the selected droplet.


Did You Know?

You can use droplets with more than one file. To use a droplet on more than one image file, hold down the Shift key, select all the image files to which you want to apply the single droplet, and then drag over the droplet. Photoshop applies the droplet to all selected files.


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

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