Record an action working with two different files

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.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

David BruggeConnect With a Mentor Commented:
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.
David BruggeCommented:
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?
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.
judekuipersAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.