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

ID JS (any version): How to access "Author Title" field value through scripting.

Community Beginner ,
Jun 14, 2012 Jun 14, 2012

Good Morning:

In the file information dialog box, there is a field for "Author Title".
Is it possible to reference this field via scripting?

I've tried many different field name options for it (i.e. "authorTitle", "titleAuthor", etc...), but no luck so far.

Thanks!

Theresa

TOPICS
Scripting
1.0K
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
LEGEND ,
Jun 14, 2012 Jun 14, 2012

myDoc.metadataPreferences.author

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 Beginner ,
Jun 14, 2012 Jun 14, 2012

Nope. That's for Author. I was talking about the field below that one, "Author Title".

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
LEGEND ,
Jun 14, 2012 Jun 14, 2012

Interesting one.

For some reason it's in the Photoshop namespace:

<rdf:Description rdf:about=""

  xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">

  <photoshop:AuthorsPosition>That's me!</photoshop:AuthorsPosition>

</rdf:Description>

You're going to need getProperty() and setProperty() for that:

doc.metadataPreferences.getProperty("http://ns.adobe.com/photoshop/1.0/","AuthorsPosition");

and

doc.metadataPreferences.setProperty("http://ns.adobe.com/photoshop/1.0/","AuthorsPosition","All About Me!");

Harbs

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 ,
Jun 14, 2012 Jun 14, 2012
LATEST

Using Export XMP .. in Acrobat I found this is a Photoshop property -- at least, it's in the Photoshop namespace.

You can set and retrieve it with this:

alert (app.activeDocument.metadataPreferences.getProperty("http://ns.adobe.com/photoshop/1.0/", 'AuthorsPosition'));

app.activeDocument.metadataPreferences.setProperty("http://ns.adobe.com/photoshop/1.0/", 'AuthorsPosition', 'Master of Puppets');

Message was edited by: [Jongware] Obligatory Edit to get Code highlighting ... Also: hi Harbs!

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