Skip to main content
April 29, 2013
Question

Lock Item problem

  • April 29, 2013
  • 1 reply
  • 587 views

Hi,

whould you help me in this regards.

any thumbnail, able to lock with lock symbol with a context menu lock item

but want get this favor/facility with script

same issue for label also

but i'm not able.

Thanks.

if ((fileList instanceof File) && (fileList.hidden == false)) {

var t = new Thumbnail(File(fileList[0]));

t.label = "Red";

$.writeln(t.label);

t.locked = true;

$.writeln( t.locked);

}

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
April 29, 2013

Something like this?....

#target Bridge

var fileList = app.document.selections;

for(var i in fileList){

if ((fileList.spec instanceof File) && (fileList.hidden == false)) {

var t = fileList;

$.writeln( t.label = "Select");

while(t.label != "Select"){};//add delay to update label

$.writeln( t.spec.readonly=true);

    }

}

April 30, 2013

Thank you very much paul.

would you hlep me in context menu lock item with script.

this code result show false;

if ((fileList instanceof File) && (fileList.hidden == false)) {

var t = new Thumbnail(File(fileList[0]));

t.locked = true;

$.writeln( t.locked);//it show false

}