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. Actions have been a part of Photoshop since version 5, and each evolution of the Actions panel has seen new features and abilities. In Photoshop, it’s now possible to create an action out of almost any command, filter, or adjustment, including blending mode changes to layers. 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

Examining the Actions Panel

PS 8.1

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.

Examine the Actions Panel

Image Select the Actions panel.

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.

Did You Know?

You can use the Window menu to display the Actions panel.Click the Window menu, and then click Actions.

Image

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

Image  Stop.Click to stop recording and save an action.

Image  Record.Click to begin recording an action.

Image  Play.Click to begin execution of the selected action.

Image  Create New Set.Creates a new action set.

Sets are like file folders; they store individual actions.

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

Image  Delete.Click to delete the selected action or set.

Image
Delete.

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 standard Actions panel, click the Actions Options button, and then click Button Mode to uncheck the option.

Building a New Action

Building a New Action

PS 8.1

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.

Important

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

Important

Recording an Action

Recording an Action

PS 8.1

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. 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

Image Specify the action settings.

Image Click Record.

Record an Action

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

Adding a Stop to an Action

PS 8.1

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, and then 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

Image Click OK.

Add a Stop to an Action

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

Controlling the Playback of a Command

Controlling the Playback of a Command

PS 8.1

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, and then 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

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

Image

See Also

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

Adding a Command to an Action

Adding a Command to an Action

PS 8.1

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, and then 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.

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

Image

Deleting a Command from an Action

Deleting a Command from an Action

PS 8.1

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, and then 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:

Image  Drag the command over the Delete button.

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

Image  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

Working with Modal Controls in an Action

PS 8.1

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, and then 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.

The action stops and lets you control the command.

Image

Image Adjust the image using the Exposure dialog box.

Image Click OK to continue the action.

Image

Changing the Order of Commands in an Action

Image

PS 8.1

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, and then 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

Copying an Action

PS 8.1

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, and then select the Actions panel.

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

Image Select how you want to duplicate the action:

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

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

Image
Image

Running an Action Inside an Action

Running an Action Inside an Action

PS 8.1

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, and then 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.

The second action is recorded inside the first action.

Run an Action Inside an 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.

Saving Actions into Sets

Saving Actions into Sets

PS 8.1

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, and then select the Actions panel.

Image Click the Create New Set button.

Image

Image Enter a name for the new set.

Save Actions into Sets

Image Click OK.

The new set is added to the Actions panel.

Save Actions into Sets

Saving Actions as Files

Saving Actions as Files

PS 8.1

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.

Save Actions as Files

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.

Moving and Copying Actions Between Sets

Image

PS 8.1

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:

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

Image  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

Inserting a Non-Recordable Command into an Action

Image

PS 8.1

When you create an action, you cannot record mouse movements, such as a brush stroke, or any of the 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.

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

Insert a Non-Recordable Command into an Action

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.

Using Enhanced Scripting

Using Enhanced Scripting

PS 8.5

A script is a series of commands that instructs Photoshop to perform a set of specified actions. These actions can be simple, affecting only a single object, or more complex, affecting many objects. The actions can call not only Photoshop, but also invoke other applications such as Adobe Illustrator. Scripts are useful for repetitive tasks and can be used as a creative tool to streamline tasks that are time consuming and boring. For example, you could write a script to access images on your digital camera. The script could process the images, and then create and save the documents in a folder that automatically includes the current date in the folder name, like Nikon 5700-12.12.2005. A scripting language lets you ask a question (an event), and use the answer to that question to perform any commands (an action) that are available in Photoshop. 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 Enhanced Scripting

Image Open a text editor, and then create the script using any approved scripting language.

Image Save the document with the correct extension, for example, ActiveLayer.js for JavaScript.

Image To access the script in Photoshop, click the File menu, point to Scripts, and then click Browse.

Image

Image Click the Look In (Win) or From (Mac) list arrow, and then select your script file.

Image Click the script that you want to run.

Image

Image Click Open to run the script.

Your script appears in a browser window.

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

Enhancing the Process with Droplets

PS 8.2, 8.4

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

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

Image  None.The file remains open after the droplet ends.

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

Image  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:

Image  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).

Image  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.

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

Image  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
Compatibility.

Using a Droplet

Using a Droplet

PS 8.2, 8.4

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.

Photoshop automatically opens and applies the selected droplet.

Image

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