RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting

Notices

Photoshop Scripting Learning and sharing for all platforms

Reply
 
LinkBack Thread Tools
  #1  
Old 06-24-2007, 12:29 PM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Clearing Action List

Hello,

How to clear the action list?


Please help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #2  
Old 06-24-2007, 12:36 PM
Senior Member
 
Join Date: Jan 2006
Posts: 119
Re: Clearing Action List

Go under windows, and make sure actions are checked. Under the actions, click on the arrow to the right and it will bring up a list of things-one of which is clear all actions. Click on it. It will bring up a box asking you if you want to clear all of the actions. Click yes, or ok. Done
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #3  
Old 06-24-2007, 12:37 PM
saby's Avatar
Senior Member
Patron
 
Join Date: Jul 2004
Location: Hungary, Pécs
Posts: 441
Re: Clearing Action List

select clear all action on the pop up window of actions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #4  
Old 06-24-2007, 12:47 PM
DannyRaphael's Avatar
Moderator
Patron
 
Join Date: Mar 2002
Location: Near Seattle, Washington, USA
Posts: 5,659
Re: Clearing Action List

Quote:
Originally Posted by Mrali View Post
Hello,

How to clear the action list?

Please help.
Do you mean "How to clear the action list?" - using a Javascript?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #5  
Old 06-25-2007, 02:16 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Re: Clearing Action List

Hello all,

Sorry, I was not clear enough. Yes, I meant using script. Using VB if possible.
If Javascript code is given, then I will have to understand it so I can convert it to VB.

I have looked at photoshop object. I found Photoshop.ActionList. I tried the folllowing code but it did not work.

Dim actlst As Photoshop.ActionList
Dim Xcount
Xcount = actlst.Count

In the other hand, If I try photoshop.ArtLayers, will work, but I have to open an image first.

Dim Xcount As Integer
Set artLayerRef2 = docRef.ArtLayers
Xcount = artLayerRef2.Count


It is logical that I have to open an image so I get the number of layers. And ActionList, maybe should at least be one loaded action to clear the action list, which I have many actions in the action list. But it did not work!

What other object should be envolved when clearing the action list?

I tried the ScriptListener but it does not record any step when selecting clear
all but it will give code when removing one single action.

Pls help

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #6  
Old 06-25-2007, 08:16 PM
Member
 
Join Date: Aug 2004
Posts: 35
Re: Clearing Action List

In case you didn't pick this up elsewhere, I have this in xtools:
Code:
Stdlib.deleteAllActionSets = function(confirmDelete) {
  if (confirmDelete != false) {
    if (!confirm("Do you really want to empty your Actions Palette?")) {
      return;
    }
  }

  var sets = Stdlib.getActionSets();

  for (var i = sets.length-1; i >= 0; i--) {
    Stdlib.deleteActionSet(sets[i].name);
  }
};
-X
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #7  
Old 06-27-2007, 01:50 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Re: Clearing Action List

Hello xbytor,
Thanks again for your support. I have used your code for deleting all action list. The following code was saved in one sinlge file called stdlib.js
But, it gives an error on ref.putIndex(cTID("ASet"), i) line of getActionSets function. Please help.

deleteAllActionSets();

function deleteAllActionSets(confirmDelete)
{
if (confirmDelete != false) {
if (!confirm("Do you really want to empty your Actions Palette?")) {
return;
}
}

var sets = getActionSets();

for (var i = sets.length-1; i >= 0; i--) {
deleteActionSet(sets[i].name);
}
};



function getActionSets()
{
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;


};
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #8  
Old 06-28-2007, 06:53 AM
Member
 
Join Date: Aug 2004
Posts: 35
Re: Clearing Action List

You need to add this at the top of the script:

cTID = function(s) { return app.charIDToTypeID(s); };

-X
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheri's Sketch - HELP NEEDED! tonyt Software 7 06-28-2007 04:22 AM
Actions skydog Software 9 03-29-2007 02:42 PM
Another Action Question Scribe Software 8 11-02-2005 07:16 AM
Free B&W Toning action set gmitchel Photo Restoration 3 10-20-2005 08:56 AM
list down the action garfield Software 1 05-14-2003 12:27 AM


All times are GMT -6. The time now is 03:46 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 Doug Nelson. All Rights Reserved




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51