Copy link to clipboard
Copied
First I want to delete hidden text layers, but I think I need this more. I've already got the "Select all text layers" script, but when I push Delete hidden layers, it also deletes all other hidden ones (pixel layers, smart objects, shapes,...). Can you guys help me on this? Thank you very much!
Copy link to clipboard
Copied
It would probably help to share a link to the source code or to post the code with attribution here.
There is no connection between the menu item for Layer > Delete > Hidden layers and a separate different script to select only text layers. Here is the AM code for the command, there is nothing in there limiting it to text layers:
var iddelete = stringIDToTypeID( "delete" );
var desc13 = new ActionDescriptor();
var idnull = stringIDToTypeID( "null" );
var ref5 = new ActionReference();
var idlayer = stringIDToTypeID( "layer" );
var idordinal = stringIDToTypeID( "ordinal" );
var idhidden = stringIDToTypeID( "hidden" );
ref5.putEnumerated( idlayer, idordinal, idhidden );
desc13.putReference( idnull, ref5 );
executeAction( iddelete, desc13, DialogModes.NO );
Copy link to clipboard
Copied
Sad to hear this, but thank you anyway. I'll probably continue to use filters and delete them manually. Have a nice day!
Copy link to clipboard
Copied
Sad to hear this, but thank you anyway. I'll probably continue to use filters and delete them manually. Have a nice day!
By @Junyi24858697x32l
I didn't say that it wasn't possible, just not possible the way you were trying to do it! :]
Copy link to clipboard
Copied
// EDIT: Original code removed, more work to be done!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more