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

Using filename to name layer

Explorer ,
Feb 07, 2013 Feb 07, 2013

Hello

Im used to doing simple actions in photoshop such as converting to CMYK/RGB and changing filenames, but i need to do something else now and wondered if anyone could point me in the right direction.

I would like to open a file, scale 50% (nothing hard there) but then name the layer the filename and make it a smart object. I would then like to open another file and do the same creating a stack of images.

The source files are all the same dimensions but are in nested layers. For this operation i have no problem duplicating the files and making a single bucket of pictures.

Ideally i would also like to use the filename to create a text layer with that name and specify a font and point size to do that with.

I hope that makes sense.

Thanks for your time

Warren.

TOPICS
Actions and scripting
947
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
Adobe
Community Expert ,
Feb 07, 2013 Feb 07, 2013

wobblewoo wrote:

… but then name the layer the filename and make it a smart object …

For this part try this:

// docNameAsActiveLayerNameAndMakeSO.jsx

var aLay = app.activeDocument.activeLayer

aLay.name = app.activeDocument.name;

var idSO = stringIDToTypeID( "newPlacedLayer" );

executeAction( idSO, undefined, DialogModes.NO );

Have fun

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
Explorer ,
Feb 07, 2013 Feb 07, 2013

Thankyou for your quick reply.

How do i actually use that? Im guessing i save those actions into a .js file and then call upon that script somehow.

I normally just use the record action and then run a batch or droplet from that.

Sorry, pretty new to this.

W

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 Expert ,
Feb 07, 2013 Feb 07, 2013
LATEST

Hmm,

this is the scripting forum, not the main forum.

wobblewoo wrote:

… Im guessing i save those actions into a .js file and then call upon that script somehow …

into a .jsx file in the right scriptfolder (for your PS-version)

close and reopen PS

open a (copy of a) file

and menu --> file --> scripts  (or similar, I only have a german CS3-Version)

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