Install Action
I created a script that installs Action
if stock exists must leave everything unchanged
otherwise you must install it.
I created a script that installs Action
if stock exists must leave everything unchanged
otherwise you must install it.
I'm sorry but it is not what I need.
I need a script that controls the action
if this action and nothing happens
if not present must install a personnel action
Amend actionSetName to suit.
#target photoshop;
var as = getActionSets();
var aSet = File(Folder.desktop + "/actionSetName.atn");
var Loaded = false;
for (var a in as){
if(as.match(/actionSetName/i)){
Loaded = true;
break;
}
}
if(!Loaded) app.load(aSet);
function getActionSets(){
var aSets=[];
var ref = new ActionReference();
ref.putIndex(charIDToTypeID('ASet'), 1);
var desc = executeActionGet(ref);
var Count = desc.getInteger(stringIDToTypeID("count")) + 1;
for(var t=1; t<=Count; t++){
var ref = new ActionReference();
ref.putIndex(charIDToTypeID('ASet'), t);
var desc = executeActionGet(ref);
var actName = desc.getString(charIDToTypeID('Nm '));
aSets.push(actName);
}
return aSets;
};
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.