DH

Is is possible to repeat an action in Photoshop X number of times within the same file automatically, without pressing Play each time? If so, how?

add a comment
0

13 Answers

  • Votes
  • Oldest
  • Latest
DM

I don't know of a way. Do you want to repeat an action across multiple layers?

You can record playing an action as an action. Maybe you could experiment with that.

Otherwise, you can set a keystroke as a trigger. That would save you from clicking "play", at least.

add a comment
0
GR

well you have a few options... You can add the action X number of times when you build the action or if your on a mac you can use applescript or automator to run the action for you.

add a comment
0
MB

Would probably help get a better answer if we knew why you wanted to perform the same action on a single file multiple times. Personally I can't think of why you would. Now, on the other hand I am quite used to performing the same action on multiple files within a folder. To do that go to File>Automate>Batch and configure your batch. The files in the folder (and subfolders as the case may be) need to be named sequentially in order to run a batch, e.g. 1, 2, 3, 4, etc.)

add a comment
0
JB

A. This thread is ancient but why? I have a video and I want to repeat the exact same action on every frame. The action: 1) apply filter, 2) advance frame.

B. Can it be done? Never answered.

C. What a pain to register for this forum. No wonder there's so few responses!

add a comment
0
JO

A. This thread is ancient but why? I have a video and I want to repeat the exact same action on every frame. The action: 1) apply filter, 2) advance frame.

B. Can it be done? Never answered.

C. What a pain to register for this forum. No wonder there's so few responses!

Hi. I registered in here just to answer ^_^.
I am having the same problem. I want a lens blur in all frames of a video.
My approach:

  • Use an external macro tool (I dont want to ¬¬)
  • I tried to do an action inside itself (recursion), but photoshop is smart enough to notice that ¬¬
  • I tried to make an action 1 that plays action 2, and action 2 plays action 1... he noticed again ¬¬.
  • My last idea. Action 1 does the filter. Action 2, plays action 1 twice. Action 3 plays action 2 twice. Action 4 plays action 3 twice. Etc. So now you have some "loops". Each action plays the action 1, but exponentially (2^x). So now you have to create this actions only once. Because then, you can simply modify action 1, and you'll keep the "loopers".
    Just an idea.
add a comment
0
JO

Sorry, forgot to mention. Action 1 applies filter and move to next frame. Then, for example, you would only have to play action 20, one time, and it will play action 1 a lot of times.

add a comment
0
ZE

why don't you use flash, it will give you better dept on the animation.

add a comment
0
GR

@jozemaner I'd suggest using a tool made for video like After Effects. Then you just decide how long a flare should exist and your done.

This kind of goes for the whole topic. If you want an effect in animation/video Photoshop is a somewhat clumsy way to do it. Everything from colorizing to PS filters are available in After Effects and you can animate the effect over time making it look a lot more realistic.

add a comment
0
MR

My workaround, after settling on an action, is to export the video as an image sequence. Once done, you can file>automate>batch your action to effect all of the images within the folder just created. After your automated action is complete, you'll need to reassemble the sequence in photoshop, after effects, quicktime then export in the codec of your choice.

It's a pain, but less painful than click-frame forward-click-frame forward-click ad nauseam.

Hope this helps.

add a comment
0
JO

My workaround, after settling on an action, is to export the video as an image sequence. Once done, you can file>automate>batch your action to effect all of the images within the folder just created. After your automated action is complete, you'll need to reassemble the sequence in photoshop, after effects, quicktime then export in the codec of your choice.

It's a pain, but less painful than click-frame forward-click-frame forward-click ad nauseam.

Hope this helps.

There is a script that once installed let's you repeat an action the number of times that you type (so if you add a "next frame" action at the end, it will do the work). Don't have the name right now, but if you want i'll post it here.

add a comment
0
UR

There is a script that once installed let's you repeat an action the number of times that you type (so if you add a "next frame" action at the end, it will do the work). Don't have the name right now, but if you want i'll post it here.

Hi, where can I get this script, and how do you use it? Thanks!

add a comment
0
SA

If you select one or more action steps and drag them onto the new action icon, it will duplicate them. If you have a very slow action like I do, this is much faster than recording it over and over.

add a comment
0
JC

Yes, you can. Here is a script, put this in a file called RunActionX-Times.jsx and copy to your Adobe Photoshop>Presets>Scripts folder. Sorry, I'm not sure where the Scripts folder is on a Mac, but you should be able to find it with no problems.

In Photoshop, your new script should appear under File>scripts. Just type in the number of times you want an action to run and VIOLA! Works like a charm!

#target photoshop
app.bringToFront();
function main(){
var dlg =
"dialog{text:'Script Interface',bounds:[100,100,500,230],"+
"panel0:Panel{bounds:[10,10,390,120] , text:'' ,properties:{borderStyle:'etched',su1PanelCoordinates:true},"+
"statictext0:StaticText{bounds:[30,10,160,30] , text:'Run Action X Times..' ,properties:{scrolling:undefined,multiline:undefined}},"+
"Xtimes:EditText{bounds:[200,10,261,30] , text:'1' ,properties:{multiline:false,noecho:false,readonly:false}},"+
"ActionSet:DropDownList{bounds:[10,50,180,70]},"+
"ActionName:DropDownList{bounds:[200,50,370,70]},"+
"button0:Button{bounds:[40,80,140,100] , text:'Ok' },"+
"button1:Button{bounds:[240,80,340,100] , text:'Cancel' }}}";

var win = new Window(dlg,"Action Runner");
win.center();

var actionSets = new Array();
actionSets = getActionSets();
for (var i=0,len=actionSets.length;i<len;i++) {
	item = win.panel0.ActionSet.add ('item', "" + actionSets[i]);      
}; 
win.panel0.ActionSet.selection=0;

var actions = new Array();	
actions = getActions(actionSets[0]);
for (var i=0,len=actions.length;i<len;i++) {
	item = win.panel0.ActionName.add ('item', "" + actions[i]);      
};
win.panel0.ActionName.selection=0;

win.panel0.ActionSet.onChange = function() {
win.panel0.ActionName.removeAll();
actions = getActions(actionSets[parseInt(this.selection)]);
for (var i=0,len=actions.length;i<len;i++) {
	item = win.panel0.ActionName.add ('item', "" + actions[i]);  
	}
	win.panel0.ActionName.selection=0;
};
var done = false; 
    while (!done) { 
      var x = win.show(); 
      if (x == 0 || x == 2) {
        win.canceled = true;
        //Cancelled
        done = true; 
      } else if (x == 1) { 
        done = true; 
       var result = valiDate();
        if(result != true) {
        	alert(result);
        	return;
        }else
        {
			var XTimes = parseInt (win.panel0.Xtimes.text);
			for (var a =0;a<XTimes;a++){
        doAction(win.panel0.ActionName.selection.text, win.panel0.ActionSet.selection.text);
			}
        }
      } 
   } 
}

main();

function valiDate(){

return true;
};

function getActionSets() { 
cTID = function(s) { return app.charIDToTypeID(s); }; 
sTID = function(s) { return app.stringIDToTypeID(s); }; 
  var i = 1; 
  var sets = [];  
  while (true) { 
    var ref = new ActionReference(); 
    ref.putIndex(cTID("ASet"), i); 
    var desc; 
    var lvl = $.level; 
    $.level = 0; 
    try { 
      desc = executeActionGet(ref); 
    } catch (e) { 
      break;    // all done 
    } finally { 
      $.level = lvl; 
    } 
    if (desc.hasKey(cTID("Nm  "))) { 
      var set = {}; 
      set.index = i; 
      set.name = desc.getString(cTID("Nm  ")); 
      set.toString = function() { return this.name; }; 
      set.count = desc.getInteger(cTID("NmbC")); 
      set.actions = []; 
      for (var j = 1; j <= set.count; j++) { 
        var ref = new ActionReference(); 
        ref.putIndex(cTID('Actn'), j); 
        ref.putIndex(cTID('ASet'), set.index); 
        var adesc = executeActionGet(ref); 
        var actName = adesc.getString(cTID('Nm  ')); 
        set.actions.push(actName); 
      } 
      sets.push(set); 
    } 
    i++; 
  } 
  return sets; 
}; 

function getActions(aset) {
cTID = function(s) { return app.charIDToTypeID(s); }; 
sTID = function(s) { return app.stringIDToTypeID(s); };
  var i = 1;
  var names = [];
  if (!aset) {
    throw "Action set must be specified";
  }  
  while (true) {
    var ref = new ActionReference();
    ref.putIndex(cTID("ASet"), i);
    var desc;
    try {
      desc = executeActionGet(ref);
    } catch (e) {
      break;    // all done
    }
    if (desc.hasKey(cTID("Nm  "))) {
      var name = desc.getString(cTID("Nm  "));
      if (name == aset) {
        var count = desc.getInteger(cTID("NmbC"));
        var names = [];
        for (var j = 1; j <= count; j++) {
          var ref = new ActionReference();
          ref.putIndex(cTID('Actn'), j);
          ref.putIndex(cTID('ASet'), i);
          var adesc = executeActionGet(ref);
          var actName = adesc.getString(cTID('Nm  '));
          names.push(actName);
        }
        break;
      }
    }
    i++;
  }
  return names;
};
add a comment
0