Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Script to unlock all layers

Community Beginner ,
Jan 23, 2012 Jan 23, 2012

Hi there,

I'm a little useless when it comes to scripting but I need a self-contained script that simply unlocks all the layers in a current document.

I'm using a script that batch exports a folder to RTF (batch_convert.jsxbin) but it's having a few problems with locked layers. Luckily, it allows you to run a script on each document it opens before it exports. If I had a script that would simply unlock all the layers first I reckon it could do the job nicely.

Thanks,

Dan

TOPICS
Scripting
5.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 23, 2012 Jan 23, 2012

app.documents[0].layers.everyItem().locked = false;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 11, 2015 Jun 11, 2015
LATEST

Thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 23, 2012 Jan 23, 2012

I didn't take a look at your posted link but if it is an exported binary then you may be out of look… Check and contact the original author…

Edit. OK, I think I see your direction now… Shut up mark u is still a muppet… sorry

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 23, 2012 Jan 23, 2012

Thanks for the code, for some reason I can't get the script to pick up on its existence though. I have sent an email to the author and did a bit of reading up on jsxbin files. Which of course are binary encrypted.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines