Photoshop: Javascript - can't unlock folder with script which was generated by ScriptListener

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
PS - script - can't unlock folder with script which was generated by Script Listener

#target photoshop

var idapplyLocking = stringIDToTypeID( "applyLocking" );
var desc10 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref5 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref5.putEnumerated( idLyr, idOrdn, idTrgt );
desc10.putReference( idnull, ref5 );
var idlayerLocking = stringIDToTypeID( "layerLocking" );
var desc11 = new ActionDescriptor();
var idprotectNone = stringIDToTypeID( "protectNone" );
desc11.putBoolean( idprotectNone, true );
var idlayerLocking = stringIDToTypeID( "layerLocking" );
desc10.putObject( idlayerLocking, idlayerLocking, desc11 );
executeAction( idapplyLocking, desc10, DialogModes.NO );
I am trying unlock this folder with script above but it doesn't work. If click on lock icon(locks toolbar and lock icon next to layer name), then script listener generate this code. I can see new item in history panel.

I am trying run it from Extend ScriptToolkit. It works good for every layers inside folder and layers in subfolders, but not for folders itself.

Photo of Jaroslav Bereza

Jaroslav Bereza

  • 880 Posts
  • 221 Reply Likes
  • confused

Posted 4 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 15632 Posts
  • 2367 Reply Likes
Official Response
This issue should be fixed by the Photoshop CC 2018 (19.1) update that was released today.