I'm new to scripting for Photoshop.
I'm looking into providing a number of users a series of tools via Actions. The hope is that this can be automated so if new tools are added or removed that the Actions Palette can be updated for the user when Photoshop is launched.
I was hoping to create a start-up script that would search for the existing Action folder by name, remove it (loading a .atn file of the same name appends instead of overwriting), and then load in the new .atn file with my updated list. Unfortunately I have not been able to find anything to modify the Action Palette.
My other thought of editing the stored Action Palette information seems to be out as "Actions Palette.psp" is a binary of some description.
Is there any functions available I can use to edit the Action Palette or some other way I could reliably modify it automatically?
Found a solution for editing the Action Palette here: https://www.ps-scripts.com/viewtopic.php?t=6704
//loading
app.load(new File("/c/temp/actionSet.atn"));
//unloading action
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 );
};
//unloading set
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 );
};