I posted this in "Photoshop-Help Me", it was probably the wrong place to put it. I have a script that extracts metadata from image files. It works fine with Bridge CS2, but does not extract any data from the "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" when it's run in Bridge CS3. What am I doing wrong?
Code: Select allRunScript4.run = function( )
{
var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, false, true);
try
{
var f = File.saveDialog("Enter Filename for Export:", "Double delimited file:*.txt");
if(!f)
{
Window.alert ("Export Metadata:" + "\n" + "No filename entered.");
}
else
{
f.open("w");
// Create header line
var headerLine = f.write ( "~Filename~,~Title~,~Author~,~Copyright~,~Address~,~City~,~State~,~Zip~,~Phone~,~Email~,~Website~" + "\n") ;
// Loop through selected thumbnails
for ( var i = 0; i < thumbs.length; i++)
{
thumb = thumbs;
ps1 = thumb.metadata;
// write metadata to file
var imageData = f.write ("~" +thumb.name + "~,", metaData(thumb),"\n");
}
f.close();
//
if (i == 1)
Window.alert ("There was " + i + " record exported to " + f + ". ");
else
Window.alert ("There were " + i + " records exported to " + f + ". ");
}// end filename else
}// end try
catch(e)
{
// Errors handled here
}
}// end function
function metaData()
{
ps1.namespace = "http://ns.adobe.com/photoshop/1.0/";
fileInfo = "~" + ps1.AuthorsPosition + "~,~" + ps1.Author + "~,~" + ps1.Copyright + "~,~";
ps1.namespace = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/";
fileInfo = fileInfo + ps1.CiAdrExtadr + "~,~" + ps1.CiAdrCity + "~,~" + ps1.CiAdrRegion + "~,~" + ps1.CiAdrPcode + "~,~" + ps1.CiTelWork + "~,~" + ps1.CiEmailWork + "~,~" + ps1.CiUrlWork + "~";
return fileInfo;
}