Can`t seem to find how to do this online or in the manual...
I successfully added a Star Rating button (SetAttr META=rating:5) for rating my favorite music tracks. When clicked, it correctly changes the file color to blue, and bolds it as well (via Define Label Filter I previously setup in Prefs / Label Assignments). However, since I have more than one of these matching filenames on my computer, Id like to apply the same blue/boldattributes toall` instances of this file across all my hard drives automatically (even thumb drives). Is this possible with one click?
I also want to be able to toggle said file with/without a star. Not sure how to do this either.
There's no way to know where or whether other files with the same name exist anywhere on any disk or USB stick, other than searching all of them for the filename.
e.g. You could use Tools > Find Files to do that.
You could set up a script which automates things and does the searching itself, but it would be quite slow since it would have to look through every folder (or at least the locations you know the files might be in).
PS: When clicking on my Star Rating button, the file gets a rating and turns blue+bold (as scripted). How can I undo and/or reverse this by toggling the same button?
You couldn't really undo a rating change as there's no record of what the previous rating was. (e.g. If the rating was 3 stars and you changed it to 5 stars, there's no way to know it used to be 3 stars and set it back.)
You could have a button which clears the rating if the file already has one (or if the file has a rating and it's the same as the rating the button sets). You would need to use scripting for that, using the scripting API's OtherMeta object to look up the file's current rating before deciding what to do.
So, clicking button A blue+bolds the file... and button B clears it according to the rule I set up in Favorites and Recent > Label Assignments (which is: Label is Blue and Bold if Rating match is 5 Stars). So far, it works well. Question is: how can I combine these two buttons into 1 toggled button?
Just got home from work, turned-on my computer and now both the script and the .dcf file/button now work perfectly! Not sure why I got errors previously.
Awesome of you to post this! I will now use your script to learn from.
Thanks lxp... much appreciated!!!