Skip to main content
Participant
March 20, 2012
Question

Is there a vb script that can delete an action set from the actions pallette?

  • March 20, 2012
  • 1 reply
  • 421 views

I am using a vb script to open photoshop, load an action set and run an action. Is there a piece of vb code that I can add to delete the action set from the actions pallette when the task is finished?

Current Code:

DIM objApp

DIM appRef

SetobjApp=CreateObject("Photoshop.Application")

objApp.Load "N:\ViatorVoice Database v2.0\photoshop actions.atn"

MsgBox ("Choose the location of the id photos and save location. Save as TIFF. Then select run action—my set—extraction")

objApp.DoJavaScriptFile "N:\ViatorVoice Database v2.0\ImageProcessor.jsx"

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
March 20, 2012

You could use a doJavaScript and use the following code...

unLoadAction("Action Set Name");

function unLoadAction(aSet){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID( "ASet" ), decodeURI(aSet));
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
};