Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello,
I am hoping someone will be able to help me. I am looking for a script that will take information that is typed into a custom metadat panel in Bridge CS4 and and automatically populate a designated IPTC field with the same information.
For example, I would like the information in the "Program Title" field of our custom panel to automatocally populate in the "Headline" field of the IPTC panel.
I am not as well versed in scripting as I would like to be and did manage to get our custom panel and an export script up an running but I still feel like I am drowning when I read this stuff.... I have found the following script in the forums and it seems like it should work if I can figure what needs to be changed and the repeat the changes for each field.
Code:
#target bridge
addNametoMeta = {};
addNametoMeta.execute = function(){
var sels = app.document.selections;
for (var i = 0; i < sels.length; i++){
var md = sels.synchronousMetadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
md.Source = sels.name;
}
}
// this script only works in bridge
if (BridgeTalk.appName == "bridge"){
var menu = MenuElement.create( "command", "Save Filename in Metadata", "at the end of Tools");
menu.onSelect = addNametoMeta.execute;
}
Can anyone help?
Thanks,
Robin
Copy link to clipboard
Copied
This should get you started...
#target bridge
addDetailToHeadline();
function addDetailToHeadline(){
if( xmpLib == undefined ) {
if( Folder.fs == "Windows" )
{var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";}
else {var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";}
var libfile = new File( pathToLib );
var xmpLib = new ExternalObject("lib:" + pathToLib );
}
/////////// You will need to get your panel details into this sring
var str = "Photo ";
/////////////////////////////////////////////////
var sels = app.document.selections;
for(var a =0; a<sels.length;a++){
var thumb = sels;
if(thumb.hasMetadata && sels.type == "file"){
var selectedFile = thumb.spec;
var myXmpFile = new XMPFile( selecte...