Page 1 of 1

Photoshop Meta Data

Posted: Tue Jan 28, 2014 7:56 pm
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

Photoshop Meta Data

Posted: Fri Jan 31, 2014 3:56 am
by Mike Hale

Photoshop Meta Data

Posted: Sat Feb 01, 2014 1:08 am
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

Photoshop Meta Data

Posted: Mon Feb 03, 2014 1:53 am
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.

Photoshop Meta Data

Posted: Mon Feb 03, 2014 4:05 pm
by CA531s
Mike...... YOU ARE THE MAN!!!
thank you so much and i will look into the lopping of layers on here.

Re: Photoshop Meta Data

Posted: Sun Feb 12, 2017 10:31 pm
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.