Skip to main content
Known Participant
May 13, 2023
Question

Scripting layer comps of smart objects

  • May 13, 2023
  • 2 replies
  • 2864 views

Hello all (:

im new to scripting and I was wondering is there a way to have a script which gives a panel with drop-down menu to select layer comp inside a smart object I have on psd file?
I just have a lot of artbords in one psd which are just the same banner with different sizes and I want the ability to change a smart object on them to a specific layer comp, so I want the ability to have a panel with drop-down menu who collects all the layercomp inside that smart object and then change the smart object to what I choose. I'm just not sure that its even possible to do with scripting, since again I'm really new to scripting (but I'm using photoshop for about 20 years now).

can someone please help?

2 replies

c.pfaffenbichler
Community Expert
Community Expert
May 14, 2023

Please post the screenshots @Stephen Marsh requested, including all pertinent Panels. 

 

I am not sure I understand the intended workflow. 

What advantage would an additional dialog with a dropdown list offer over the Properties Panel? 

Or do you want to change the Layer Comp an all instances of the Smart Object in the document? 

Known Participant
May 14, 2023

i uploaded a sample file

My actual file has 70 diffrent artboards sizes, and also is more complex than what i uploaded.

if youll see the file there is smart object which calls "max solid" and it has 13 layercomps inside of it. i want the ability to have a panel which inside of it you can replace all "max solid' to specific layercomp from selected drop down menu and also change all text and buttons colors across all artboards.

 all inside one panel which i will write, for now i found 2 problems:

1. i dont know if its possible to do the layercomp drop down menu

2. i found that the find and replace tect window wont support long text - when i try to trplace the legal text to long paragraph it wont let me paste the long paragraph into the text field.

 

hopefully now i explained myself better

and thank you very much for replying (:

c.pfaffenbichler
Community Expert
Community Expert
May 14, 2023

As you say »Panel« this concerns UXP Scripting as opposed to ESTK Scripting? 

 

Could you give an example of a text that won’t process in »Find an Replace Text«? 

Stephen Marsh
Community Expert
Community Expert
May 14, 2023

@Lital2252941669o3 - Ideally a sample file would be provided, or at least a screenshot of the layers and comps panels to illustrate.

Known Participant
May 14, 2023

thank you for the replay - i uploaded the sample and explained myself better (hopefully)