Creating Custom Actions

Photoshop provides a ridiculous number of shortcuts. To be perfectly honest, it provides more shortcuts than you'll ever need. For example, you may never meet anyone who regularly links layers by Ctrl+Shift+Alt-right-clicking( z +Shift+Option+Control+clicking) on elements in the image window. But it is possible. And by choosing Edit Keyboard Shortcuts, Photoshop gives you the unprecedented ability to assign your own keyboard shortcuts to such important but hitherto-shortcut-challenged commands as Unsharp Mask, Variations, and Color Range.

But sometimes a simple keyboard shortcut isn't enough. You may find yourself performing certain sequences of commands in the same order each time. Maybe you've got a series of very similar images shot with a digital camera, and they all need the same saturation adjustment via Hue/Saturation, the same gamma tweak via Levels, and the same sharpening via Unsharp Mask. Even hitting three shortcuts in a row for each image in a large group can get pretty tiresome.

Photoshop's answer is the Actions palette, which lets you record an entire sequence of commands and other operations as a single action, and then apply those operations to an open image or an entire folder of files while you take a much-needed break. Much better than a keyboard shortcut that can only open a command, actions can actually use the command to change your image, close that command, and move on to the next one. If you spend a lot of your time performing repetitive tasks , actions can help you automate your workaday routine so you can devote your creative energies to something more important, such as a nap.

How actions work

Choose Window Actions or press Alt+F9 (or Option+F9 on the Mac) to view the Actions palette. The icons along the bottom of the palette ” labeled in Figure 13-16 ” enable you to record operations and manage your recorded actions. An action may include just a single command, or you can record many operations in a row.

image from book
Figure 13-16: The Actions palette lets you record a sequence of operations and assign a keyboard shortcut.

As with layers, you can organize actions into sets. But although sets are optional with layers, they're essential with actions. Sets are the only method for saving actions so that you can use them on another machine, transfer them to an upgraded version of Photoshop, or keep them safe in case of a crash.

With that in mind, here is how you go about recording your own custom action.

STEPS: Recording an Action

  1. Select a set in which to store your new action . Just click the set that makes sense. Or create a new set by clicking the little folder icon at the bottom of the Actions palette.

    Tip  

    Naturally, Photoshop asks you to name the set. If you don't want Photoshop to bother you with such trivialities, Alt+click (or Option+click) the folder icon to bypass the New Set dialog box. You can likewise Alt+click other icons to skip other dialog boxes, but it's not really a good idea; when recording actions, it always pays to stay as organized as possible.

  2. Create a new action. This is very important. Much as you might like to click the record button and go, you have to first make an action to hold the recorded operations. Click the new action icon ” the one that looks like a little page at the bottom of the Actions palette. Photoshop responds with the New Action dialog box, shown in Figure 13-17.

    image from book
    Figure 13-17: When creating a new action, you can assign a name, shortcut, and color. The shortcut must involve a function key. The color shows up in theActions palette's button mode.

    If you accidentally start recording and immediately decide against it, press Ctrl+Z ( z +Z on the Mac) before initiating an operation to kill the new action.

  3. Enter a name for your action . If you decide that your new action belongs in a different set than you originally imagined, choose the alternative set from the Set pop-up menu. Strange as it may sound, you can also assign a color to an action. The color affects the appearance of the action in the Actions palette's button mode, as discussed later.

  4. Assign a keyboard shortcut . Photoshop prohibits you from assigning alphanumeric shortcuts, instead limiting you to function keys in combination with Shift and/or Ctrl ( z on the Mac). This is particularly debilitating on the PC ” where Windows reserves Ctrl+F4, Ctrl+F6, and all combinations of F1 ” and reduces your maximum number of possible shortcuts to a scant 42, a small fraction of the quantity otherwise supplied by Photoshop. Things are slightly better on the Mac. F1 is fair game, and on some keyboards, function keys go as high as F16; quite to its credit, Apple never sullied the Mac keyboard with such absurdities as Scroll Lock and Pause/Break, thus increasing your maximum number of shortcuts to 60.

  5. Press Enter or Return to start recording. The circular record icon at the bottom of the Actions palette turns red to show you Photoshop is now observing your every action.

  6. Perform the desired operations. If you want to record a sequence of operations, work through the sequence as you normally would.

    But whatever you do, relax. There's no hurry and no pressure to perform. Photoshop is not recording your actions in real time. You can start to choose a command and then change your mind. You can even open a dialog box and cancel out of it. Like a kindly grandmother, Photoshop turns a blind eye to your hesitations and false starts. Even if you mess up, just keep going. Photoshop lets you insert, delete, and reorder operations after you've finished recording an action.

    image from book
    Selective recording

    Photoshop does not necessarily record your every action. Operations that do not affect layers or selections, such as zooms, scrolls , and commands under the View or Window menu, go ignored. (To force Photoshop to record a command under the View or Window menu, see "Editing an action.") Perhaps the most important thing to remember is that Photoshop doesn't record the Undo command in actions, meaning that if you make a mistake as you're recording an action and then undo, the action will contain your goof but not your correction. If you have any concerns, keep an eye on the Actions palette. By the time you begin an operation, the previous operation will have appeared as an item inside the palette. If it fails to appear, it wasn't recorded. Switching palettes is not recorded, so you can return to the Actions palette and to your bearings any time you like.

    image from book
     
  7. When you're finished, click the stop button. That's the square icon at the bottom of the Actions palette. Or just press the Escape key. Congratulations, you've now successfully recorded an action.

    Tip  

    Photoshop not only records your operations in the Actions palette, but it also applies them to whatever image or images you have open. If you switch to a different image window or open an image while recording, Photoshop adds the operation to the action. For this reason, it's usually a good idea to have a dummy image open. When you're finished recording, you can choose File Revert (or press F12, if you haven't reassigned it) to restore the original, unaltered image. Also, if you want to include a Save operation, be sure to choose File Save As. This way, the original file remains intact.

Editing an action

If you take it slow and easy, you have a good chance of recording your action right the first time. But no matter if you flub it. Photoshop offers the following options to help you get it exactly right:

  • Adding more operations: To add more operations at the end of an action, select the action and click the round record icon. Then start applying the operations you want to record. When you finish, click the stop icon. Photoshop automatically adds the new operations to the end of the action. To add operations at a specific point, twirl open the action, select the operation name after which you want to begin recording, and click record.

  • Moving an operation: To change the order of an operation, drag the operation up or down in the list. You can even drag an operation from one action into another if you like.

  • Copying an operation: To make a copy of an operation, press Alt (or Option) and drag it to a different position in the action.

  • Investigating an operation: If you can't remember what settings you entered in a dialog box, or you don't recognize what an operation name such as Set Current Layer means, click the triangle in front of the operation name to expand it. Figure 13-18 shows an example of the operation Fill expanded to show the recorded settings.

    image from book
    Figure 13-18: Triangles twirl and expand an operation to reveal settings. The check marks turn on whole sets, actions, or independent operations. Click in the second column to force the display of a dialog box.

  • Changing a setting: If an operation name includes an empty square to the left of it (as it does next to Set Layer Styles in Figure 13-18), it includes dialog box settings. When you expand the operation, Photoshop lists those settings. To modify the settings, double-click the operation name, revise the options in the dialog box, and click OK.

    Tip  

    As when you record an action, Photoshop applies the settings to your current image. If this is a problem, press Ctrl+Z (or z +Z) to undo the operation. This reverses the settings applied to the image, but has no effect on the changed settings in the action. The Actions palette ignores Edit Undo, which can be a double- edged sword. When editing a setting, it's handy to be able to undo without affecting the action itself. But don't forget that Undo is also ignored while recording actions.

  • Leaving a setting open: Not all images are alike, and not all images need the same settings applied to them. If you want to enter your own settings as the action plays, click inside the empty square in front of the operation name. A little dialog box icon appears to show you that you must be on hand when the action is played. In Figure 13-18, for example, a dialog box icon appears next to Make layer. When the action is played , Photoshop leaves the "Save Changes?" alert message on-screen until you confirm your decision. Then the action continues playing until it reaches the next dialog box icon or the end of the action.

    Tip  

    Press Alt (or Option) and click the square in front of an operation name to display a dialog box icon for that one operation and hide all others. To bring up dialog boxes for everybody, Alt+click (Option+click) the same dialog box icon again or click the red dialog box icon in front of the action name.

  • Forcing Photoshop to record a command: If Photoshop seems unable or unwilling to record a command, choose Insert Menu Item from the Actions palette menu. Photoshop displays a dialog box that asks you to choose a command. Go ahead and do it ” the dialog box won't interfere with your progress. Figure 13-19 shows the Button Mode command chosen , thus setting up an action that switches between the palette's two action-display settings. (More on the button mode in the next section.)

    image from book
    Figure 13-19: Choose Insert Menu Item from the Actions palette menu to force Photoshop to record a command.

    Tip  

    Insert Menu Item also turns out to be the only way to record a dialog box with no settings whatsoever. This means you can capture commands such as Image Size and Canvas Size with no predetermined changes. Insert Menu Item will also recall filters such as Unsharp Mask and Gaussian Blur with the last-applied settings.

  • Inserting a stop: A stop is a pause that permits you to convey a message to the user of an action. The user can't do anything during the stop ” just read your message and then opt to continue or cancel. But it's a great way to identify a complex action so you remember its purpose and how it works later on down the line.

    Tip  

    Right at the outset of a big action, choose Insert Stop from the Actions palette menu. Then enter a message that explains the action. (Select the Allow Continue check box to enable the user to continue the action after reading the message.) After you record the action and get all the bugs ironed out, deactivate the stop by turning off its check in the left-hand column of the palette. This way, it's there when you need it. What do you do two years later when you forget what the action does? Turn on the stop, play the action, and read your message.

  • Changing the name and function key: Renaming an action works just like it does in the Layers palette: double-click the name to highlight it and then enter a new one. To change the shortcut or color assigned to an action, press the Alt key (Option on the Mac) and double-click the action name. Note that function keys assigned to other actions will appear dimmed and unavailable.

  • Deleting an operation: To delete an operation, drag it to the trash icon at the bottom of the Actions palette, or select the operation and Alt+click(Option+click) the trash can icon. If you use the latter technique, a warning appears, giving you the chance to rethink your deletion.

Playing actions and operations

When it comes time to play your action, you can play all of it or just a single operation. The simplest way to play back an entire action is to press the function key you assigned to it. If you can't remember the function key or didn't assign one, you may prefer to switch to the button mode. To do so, choose the Button Mode command from the Actions palette menu, as shown in Figure 13-20. You can now see the colors you assigned to the actions, as well as the function keys. Just click the button for the action you want to play.

image from book
Figure 13-20: Choose the Button Mode command to view each action as an independent button, with shortcuts displayed (left). You can resize the palette to view buttons in multiple columns (bottom).

But the button mode has its drawbacks. All you can do is click buttons. You can't edit actions, you can't change the order of actions, you can't assign new function keys, and you can't play individual operations. This is a great mode if you want to protect your actions from less adept users, but it's an awful mode if you want to modify your actions and create new ones.

To return to the standard Actions palette, choose the Button Mode command again. Then try some of these less- restrictive action-playing techniques:

  • To play a selected action, click the play icon at the bottom of the palette. You can also play an action by Ctrl+double-clicking an action name. (On the Mac, z +double-click the action name.)

  • To play an action from a certain operation on, select that operation name in the palette, and then click the play icon.

    Tip  

    To play a single operation and no more, Ctrl+double-click ( z +double-click) the operation name.

  • You can tell Photoshop which operations to play and which to skip using the check marks in the on/off column (the leftmost column, labeled back in Figure 13-18). Click a check mark to turn off the corresponding operation. Alt+click (or Option+click) the check mark in front of an operation to turn that one operation on and the rest off. To turn all operations on again,Alt+click (Option+click) the check mark again or click the red check mark by the action name.

    Tip  

    If an action makes a mess of your image, it's generally not a problem thanks to Photoshop's multiple undos. To restore your image to its previous appearance, switch to the History palette and click the state in the list that comes directly before the first operation in your action. If you're at all concerned that an action may do irreparable damage ” say, it contains more than 20 undoable steps ” then record yourself saving a snapshot at the very beginning of the action. As long as the image remains open, the snapshot remains available. For complete information on the History palette, see Chapter 3.

Saving and loading sets

Photoshop requires you to put every action inside a set. But that doesn't mean the set automatically gets saved. It's true that Photoshop saves sets and actions to a special preferences file, but only when you quit the program . If you crash, any actions recorded during this session are lost.

Anytime you record an action, go ahead and take a moment to save or update its set. To do so, click the set name in the Actions palette, and then choose Save Actions from the palette menu. Actions are 100 percent cross-platform. But to work on any platform, the file name must include the three-character extension .atn .

You can also load sets of actions. By default, Photoshop displays only the Default Actions, a set of a dozen actions from Adobe. To open other predefined Adobe sets, choose one of the commands at the end of the Actions palette menu. To load some other set, choose the Load Actions command.

Tip  

Turns out, you can add your own custom sets to the presets at the end of the Actions palette menu. Quit Photoshop. Then copy the action set (.atn) files to the Photoshop Actions folder inside the Presets folder that's inside the same folder as the Photoshop application. Then relaunch Photoshop and check out the Actions palette menu. Note that Photoshop doesn't automatically load the custom set ” you have to choose the command to do that.



Photoshop CS2 Bible
Photoshop CS2 Bible
ISBN: 0764589725
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net