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

Editing Nested Text Layers using Visual Basics

New Here ,
May 28, 2018 May 28, 2018

So I am just about to pull my hair out right now. I am trying to update the layers text contents based upon the actual name of the layer. I have a created the following code which works on a newly created Photoshop 2015 document, but doesn't work on another more complex file I have.

EDIT: So I just figured out the reason why it wasn't working. The text layers are nested in folders. How would I update this code in order to account for the nested text layers, any help would be awesome thank you!

artlayer.PNG

TOPICS
Actions and scripting
232
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 ,
May 28, 2018 May 28, 2018

If you're layer has groups, you have to use a recursive function that checks for groups, then send that group to the loop function to check it. Your script will only do the top level of layers.

Is there any reason you're not using javascript? Not many people use VB, so it's harder getting help, and javascript is cross platform.

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 ,
May 28, 2018 May 28, 2018
LATEST

Didn't see your edit until after I posted. Like I said, you need to create a function with the loop in it to make your changes and check for groups or folders, then if you detect one, call the function again with using the folder. Again, not sure how to do this with VB.

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