Question
get and set rating with JavaScript
I am trying to get and set the rating (stars) of JPEG and RAW data with JavaScript, but I cannot find an interface to do this.
I already get the file name and other information. Is there any techniques?
#target bridge
var selectedItems = app.document.selections;
var currentFolder = null;
if (selectedItems.length > 0) {
currentFolder = selectedItems[0].parent.path;
} else {
currentFolder = "~/Pictures";
}
var d = Folder.selectDialog("select folder", currentFolder);
var f = d.getFiles();
for(var i = 0; i < f.length; i++){
alert(f[i].name, f[i].rating); // rating is undefined
}
