Hi all,
I want to create a script that allows me to copy the metadata "Caption" (or "description") in the metadata "Author".
I am a beginner in scripting. I found the beginning of the script but I can not finish it.
Thank you for your help.
Code: Select all#target bridge
if( BridgeTalk.appName == "bridge" ) {
copy_meta = MenuElement.create("command", "Caption_to_Author", "at the end of Thumbnail");
}
copy_meta.onSelect = function () {
copy_Description();
}
function copy_Description(){
var sels = app.document.selections;
for (var i = 0; i < sels.length; i++){
var md = sels.synchronousMetadata;
var str = md.Description;
md.namespace = "http://purl.org/dc/elements/1.1/";
md.Author = str;
}
};
Copy metadata
Copy metadata
Please try this now..
Code: Select all#target bridge
if( BridgeTalk.appName == "bridge" ) {
copy_meta = MenuElement.create("command", "Caption_to_Author", "at the end of Thumbnail");
}
copy_meta.onSelect = function () {
copy_Description();
}
function copy_Description(){
var sels = app.document.selections;
for (var i = 0; i < sels.length; i++){
var md = sels.synchronousMetadata;
md.namespace = "http://purl.org/dc/elements/1.1/";
var str = md.description[0];
md.namespace = "http://ns.adobe.com/photoshop/1.0/"
md.Author = str;
}
};
Code: Select all#target bridge
if( BridgeTalk.appName == "bridge" ) {
copy_meta = MenuElement.create("command", "Caption_to_Author", "at the end of Thumbnail");
}
copy_meta.onSelect = function () {
copy_Description();
}
function copy_Description(){
var sels = app.document.selections;
for (var i = 0; i < sels.length; i++){
var md = sels.synchronousMetadata;
md.namespace = "http://purl.org/dc/elements/1.1/";
var str = md.description[0];
md.namespace = "http://ns.adobe.com/photoshop/1.0/"
md.Author = str;
}
};