Skip to main content
Participant
January 11, 2014
Question

I need to create an action or script to save the file with the name of the selected layer

  • January 11, 2014
  • 1 reply
  • 1230 views

I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).

How could modify the script: 'Layer Comps To Files.jsx' to get the result?

Warning: I do not need to export all layers as files.

Who can help me?

THX in advance

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
January 11, 2014

Say what?

Could you please post a screenshot to illustrate the issue (original file and layer structure and the resulting files)?

patdepriAuthor
Participant
January 11, 2014

For example:

I have a file with several layers:

- Article 1 (visible)

- Article 2 (hidden)

- Article 3 (hidden)

- Article 4 (hidden)

- Article 5 (hidden)

etc..

- Background (visible)

Only Article 1 and the background are visible.

Now I have to save each article (visible) with the background always active (or other layers visible) and the name of the file must always contain the name of the slected article.

For 2 or 3 times you can do it ...

but for a hundred? ...

So, I want to create an action or script that, by selecting the layer with the name of the article (visible), save a copy with the name of the selected layer (with all others visible layers).

However, I think it was clear from the first, just to save a copy of all visible layers with the name of the selected layer.

c.pfaffenbichler
Community Expert
Community Expert
January 11, 2014

If I understand correctly this would basically need »Delete Hidden Layers« and »Save As« – the first can be recorded with ScriptingListener.plugin and the second part can be done with DOM code.

Is there a naming convention to the articles and is the background the Background Layer or is it just the lowermost visible Layer?

But let me ask about something else: Why would you rather write all that text instead of posting two (ot three) screenshots of a mocked up file?