Skip to main content
rechmbrs
Inspiring
January 12, 2017
Answered

Hide work layers during execution.

  • January 12, 2017
  • 2 replies
  • 1387 views

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

This topic has been closed for replies.
Correct answer Smart Object

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);

2 replies

Smart ObjectCorrect answer
Participant
January 12, 2017

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);

rechmbrs
rechmbrsAuthor
Inspiring
January 12, 2017

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

darkie1973
Inspiring
July 7, 2017

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

natrev
Legend
January 12, 2017

Hi RONC,

Can explain clearly to step by step process (or) Can you give any samples/ tried code to proceed further.

-yajiv