Looking to CS2 & CS3 rererences, the way to define Metadatapreferences is the same.
MetadataPreference.setProperty (namespace:string, path:string, value:string)
so it's quite weird.
Here is a example written by Olav,
Maybe you can watch for info in it :
//MetadataExample.jsx
//An InDesign CS2 JavaScript
//Adds metadata to an example document.
var myDocument = app.documents.add();
with (myDocument.metadataPreferences){
author = "Olav Martin Kvern";
copyrightInfoURL = "http://www.adobe.com";
copyrightNotice = "This document is copyrighted.";
copyrightStatus = CopyrightStatus.yes;
description = "Example of xmp metadata scripting in InDesign CS";
documentTitle = "XMP Example";
jobName = "XMP_Example_2003";
keywords = ["animal", "mineral", "vegetable"];
//The metadata preferences object also includes the read-only
//creator, format, creationDate, modificationDate, and serverURL
//properties that are automatically entered and maintained by InDesign.
//Create a custom XMP container, "email"
var myNewContainer = createContainerItem("http://ns.adobe.com/xap/1.0/", "email");
setProperty("http://ns.adobe.com/xap/1.0/", "email/*[1]", "okvern@adobe.com");
}
Loic
... View more