Photoshop Meta Data

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

CA531s

Photoshop Meta Data

Post by CA531s »

Hello All,

So I was trying search, but couldn't find any info on it but is there a possible way to create a script in which Photoshop will copy the text in the Photoshop file and add it to the Meta Data. I don't have the slightest clue as in where to start or if it is even possible. Any ideas, examples, or clues would be very much appreciated.

Thanks
Mike Hale

Photoshop Meta Data

Post by Mike Hale »

CA531s

Photoshop Meta Data

Post by CA531s »

Thanks Mike but no not what i needed.

not sure if my first post made 100% sense, but basically this is what i am trying to do.

imagine i have a photoshop file with 3 text layers
1 layer says "Hello"
2nd layer says "im over here"
3rd layers says "bye"

is there a way to have a script copy the words in those 3 layers and put it into the files metadata, like in its description field.
not sure if that makes more sense to what i am looking for.


Thanks for the reply and help
Mike Hale

Photoshop Meta Data

Post by Mike Hale »

Ok, I mis-read your question. It is possible. Here is how to add the text of selected( active ) text layer to a document's keyword metadata.
Code: Select allapp.activeDocument.info.keywords = [app.activeDocument.activeLayer.textItem.contents];

You can use a different metadata field if you wish. The Photoshop javascript ref has the available metadata fields under DocumentInfo.

So you just need to loop through the layers collecting the text contents into an array then stuff it metadata. There are plenty of examples of lopping layers on this forum.
CA531s

Photoshop Meta Data

Post by CA531s »

Mike...... YOU ARE THE MAN!!!
thank you so much and i will look into the lopping of layers on here.
iTenol
Posts: 2
Joined: Sun Feb 12, 2017 8:40 pm

Re: Photoshop Meta Data

Post by iTenol »

Did you ever get this figured out and working I'm trying to something similar.

Except I'm looking to do this for all field layers rather than just the active layer.

Any help of examples would be appreciated... Not a programmers so struggling with this.