Copy link to clipboard
Copied
How may I hide work layers which are deleted at job end from showing in the layer panel? I have used atn2jsx to make a script and find that the user becomes worried about all of layer stuff showing.
RONC
put this code at the beginning and the end of your script, it will hide the layers palette
cTID = function(s) { return app.charIDToTypeID(s); };
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('Tgly'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, DialogModes.NO);
Copy link to clipboard
Copied
Hi RONC,
Can explain clearly to step by step process (or) Can you give any samples/ tried code to proceed further.
-yajiv
Copy link to clipboard
Copied
put this code at the beginning and the end of your script, it will hide the layers palette
cTID = function(s) { return app.charIDToTypeID(s); };
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('Tgly'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, DialogModes.NO);
Copy link to clipboard
Copied
Bam bam bam says the Chef.
Exactly what I wanted.
For others info: app.activeDocument.suspendHistory( scriptComment, main function name); this will hide the History forever. scriptComment will show as only history entry and main function name is the name of the main function.
Thanks for many who have looked for your solution.
RONC
Copy link to clipboard
Copied
If this does what I think it does, then I have been looking for this! Just to clarify,... I have a script that can require up to 10 steps to complete in the History palette; am I to understand that this script will hide all 10 steps, leaving a single History step labeled with the script name?
-Eric
Copy link to clipboard
Copied
Works as advertised.
RONC
Copy link to clipboard
Copied
Thanks,.... did some digging and figured it out!! Many thanks!!
-Eric
Copy link to clipboard
Copied
If you want to use DOM code to toggle pallets use: app.togglePalettes();