Hi
I believe it's possible for a script to load an action into the Photoshop action palette, is it also possible to remove an action from the palette?
Thanks,
CJ
Loading and unload actions
-
Paul MR
Loading and unload actions
Code: Select all//load an action set
app.load(new File("/c/temp/actionSet.atn"));
function unLoadAction(action){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID( "Actn" ), decodeURI(action));
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
};
function unLoadActionSet(actionSet){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID( "ASet" ), decodeURI(actionSet));
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
};
app.load(new File("/c/temp/actionSet.atn"));
function unLoadAction(action){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID( "Actn" ), decodeURI(action));
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
};
function unLoadActionSet(actionSet){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID( "ASet" ), decodeURI(actionSet));
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "Dlt " ), desc, DialogModes.NO );
};