Question
documentID to source?
I tried to modify a script to copy the <xmpMM:DocumentID> to the <photoshop:TransmissionReference>, obviously I have had no luck. Where do I find the correct syntax for calling up the two fields?
| #target bridge | ||
| if( BridgeTalk.appName == "bridge" ) { | ||
| DocumentIDToSource= MenuElement.create("command", "Document ID to Source", "at the end of Tools"); | ||
| } | ||
| DocumentIDToSource.onSelect = function () { | ||
| var sels = app.document.selections; | ||
| for(var a in sels){ | ||
| md =sels.synchronousMetadata; | ||
| md.namespace = "http://ns.adobe.com/photoshop/1.0/"; | ||
| var DocumentID = md.DocumentID.toString().replace(/,/g,'.');// Replace a comma with decimal point | ||
| md.namespace = "http://purl.org/dc/elements/1.1/"; | ||
| md.TransmissionReference=''; | ||
| md.TransmissionReference = DocumentID; | ||
| } | ||
| }; |
Any suggestions will be appreciated.
