Closed astx123 closed 6 years ago
Here is your other script which works, if anyone needs it. Just enable the "inspector" panel in Window.
`
function KeyDetails(){
var pp = new InspectorPanel("With Compliments");
this.panelRef = pp;
var zzz = [["Number Of Keys","[[javascript:getDetails()]]"]];
var tp = new TextPanelette("File an Keyword Details", "", "[[this]]", zzz);
pp.registerPanelette(tp);
app.registerInspectorPanel(pp);
}
function getDetails(){
var retval = "";
for(var i=0; i < app.document.selections.length; i++) {
var thumb = app.document.selections[i];
var selectedFile = thumb.spec;
md = new Thumbnail(selectedFile).synchronousMetadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
var keys = md.Keywords;
retval +=decodeURI(thumb.spec.name)+" Keywords = "+keys.length+"\n";
}
return retval;
}
KeyDetails();
`
First it doesn't appear anywhere (or I didn't find it), and then these errors appears:
JavaScript error (...\KeyWordCount.jsx:5) undefined is not an object JavaScript error (Metadata:5): undefined is not an object
Can you fix this useful script?