Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Record an action working with two different files

Posted on 2006-06-12
Medium Priority
Last Modified: 2010-04-03
I understand how to record and use actions.

 My question is:
I'm trying to create an action that uses one picture to modify another. I keep getting stuck because it will refer to "document -3" or whatever instead of the filename. I'm trying to create a mask to change a batch of gifs the same way.

If there's an easier way, I'm all ears.
Question by:judekuipers
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 26

Expert Comment

by:David Brugge
ID: 16900044
So that we better understand, what are you trying to accomplish with your action? Are you using the same file each time to apply the modification? How is the file being "applied" to make the modification?

Expert Comment

ID: 16901927
If this helps at all, selections are not recordable in actions. If you are just wanting to create a Levels Layer Mask for example, you can create your action while recording your Levels adjustment layer edits. All new images will have that Levels adjustment layer.

Author Comment

ID: 16917434
Thanks for the clarification request. I have an avatar graphic where the avatar is pregnant. I want to have the same avatar, but not pregnant. I've figured out a sort of mask from the pregnant graphic. (I don't really understand masks, so it's just a white layer with the part I want to show cut out. Not a true mask as far as photoshop goes, just a make-shift mask that I made from the pregnant avatar.) Basically I'm just looking to do:

1) Cut off the extra pixels (the pregnant belly)
2) Grab the edge color of the shirt (each shirt is a different color) and outline the cut area with the new color.
3) Copy the (very simple, 2 color) shading onto the part that was cut. This basically means going a shade lighter one pixel inside the outline, and a still lighter shade one pixel inside of that.

The shirts are all different (tank tops, sweaters, etc.) but they all work the same way -- just cut off that belly and apply the edge and shading to the part that was cut.
LVL 26

Accepted Solution

David Brugge earned 500 total points
ID: 16917756
What I had in mind when I asked the question was that sometimes you can load a shape as a brush or a texture and call it with an action. But I don’t think that you need to do that.

Here is how I would approach your project.

1.      Open the file with your mask layer (yes it is a mask even if you are not using Photoshop’s masking function) and make that layer active.

2.      Open the image that you want to convert and arrange it so that you can see the file with your layer mask.

3.      Return to the layer mask file. Type V to select the move tool and while holding down the shift key, drag the mask onto your new image. Holding down the shift key makes the dragged image move to the center of the canvas. Because it is a mask with a hole in it, it should line up with your new image (providing they are both the same size and resolution)

4.      Select your eyedropper tool and make sure that it is set to sample just a single pixel.

5.      With the mask lined up over your image, start recording your action.

6.      Type D to set your swatch colors to black and white. Type X to set your background color to white.

7.      Type I to get your eyedropper tool and sample the outline color from a spot that will always have the color no matter which image you work on.. (Yes, the sample tool may already be selected, but you want to make sure it gets selected each time you run the action)

8.      Type W to select the Magic Wand tool. Making sure that the mask layer is selected, click inside of the opening.

9.      Go to  Edit/Stroke to being up the stroke dialogue box. Set the width to twice the width as you want the finished outline to be, stroke to be Inside, blend mode normal, opacity 100%. Click Okay.

10.      Type X to switch swatch colors and bring white to the foreground.

11.      Click inside of the opening again and again bring up the Stroke dialogue box. Set the stroke to half the width that you used last time, select to stroke Outside the marquee, and set the Opacity to 20% (you may have to change this to get the lighter color that you want.) Click Okay. Keep the marquee selection active.

12.      Now Type X to swap swatch colors again. Again open the stroke dialogue (aren’t you glad that you’re making an action of all of this?) This time, stroke Inside with the selected color the actual width that you want the lightest line setting the opacity to 100%. Click okay. Again keep the marquee active.

13.      Type X to bring white to the foreground. One more time open the stroke dialogue box. Stroke Inside with the same width as before but with an opacity of say…40%.

14.      Now type Ctrl (Cmnd on a Mac)-E to merge the white mask and the shaded outline with the image below.

15.      If you want your action to save your image, do a “Save as” before you stop recording your action.

16.      Stop recording your action.

Now, open another image, drag your mask in place and run the action. If you want to get fancy, you can put a stop command at the beginning of your action, then run a batch file on all of your files at once. The action will start automaticly but stop to let you drag your mask and then continue the action.

I hope that this does the trick. Have fun.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll explain how to change the color of a selection in Photoshop. I'm sure there are a couple different ways to do this in photoshop, but this is my preferred method in Photoshop. I am using Photoshop CS6 and I will be adjusting the…
The Summer 2017 Scholarship Winners have been announced!
In this tutorial viewers will learn how to correct colors in Photoshop using the Levels adjustment Open a photo for editing in Photoshop: Begin by creating a new adjustment layer by going to Layer > New Adjustment Layer > Levels: Select "OK" on the …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question