6/7/2023 0 Comments Wanted textmate smart![]() ![]() Where you can also see my other iTunes triggers. The trigger pane of QS’s preferences looks like this I added ~/Library/iTunes/Scripts to Quicksilver’s catalog, so QS would know about “Downgrade and Skip.” I then made a QS trigger to run “Downgrade and Skip” and bound it to Control-Option-Command-Downarrow. Here’s where Quicksilver comes to the rescue. Having this script available from an iTunes menu is all very well and good, but I don’t usually have iTunes running as the top application, so to get at its menus I have to interrupt my work and bring it to the top-certainly not what I want. So subtracting 20 from the rating is the same as reducing it by one star. The iTunes ratings system uses a 100-point scale internally, with each 20 points representing one star in displayed rating. As I said at the beginning of the post, AppleScripts are often very easy to read, so commentary is probably unnecessary except for the line where the rating is reduced by 20. I call it “Downgrade and Skip,” and it’s saved in ~/Library/iTunes/Scripts, which means it shows up in the iTunes AppleScript menu. Here’s the script that downgrades the rating of the current track and skips to the next: tell application "iTunes" Step 3 is where the AppleScript comes in. ![]() (Click on the screenshot to see it at full size.) The new form of the smart playlist looks like this Reduce the rating of the bad tracks as I encountered them in the playlist.Adjust the smart playlist to only include songs with ratings at or above that baseline.Select all the tracks and choose a value from the My Rating item in the File menu, thus giving a baseline rating to all the tracks in my library.What finally realized today was that I didn’t have to give legitimate ratings to all of my songs. Ratings seem the obvious solution to this problem, but I’ve never rated any of my 6000-7000 songs and can’t imagine going through all of them to do so. Unfortunately, this means that their “Last Played” field doesn’t get updated and they can come back around faster than the tracks I do like. ![]() Many of my bad tracks show up in this list, and before today I simply skipped past them when they started playing. anything I’ve listened to in the last week.I have a smart playlist that starts with my whole library, but eliminates And I probably do want to hear them if I’m listening to the CD in order. I don’t want to get rid of the tracks because I own them and went to the trouble of ripping them. Usually, these my wife’s, my daughter’s, or my son’s, but sometimes they’re bad tracks of mine. I have in my iTunes Library many songs that I don’t want to get rid of but typically don’t want to listen to. Here’s an outline of what I wanted and how I got it. It went pretty smoothly, which makes me suspicious. Today, I decided to revamp one of my iTunes playlists and had to use AppleScript to do it. Sometimes, however, AppleScript is unavoidable. (An unexpected benefit of moving from BBEdit to TextMate is that TextMate’s AppleScript support is almost non-existent. I’ve written programs in a dozen or so languages over the years, and it’s this language for non-programmers that has always given me the most trouble. But there’s something wrong with AppleScript itself. Some of the problem, of course, is that AppleScript is a glue language and each application gets to choose its own commands, elements, and properties. The example scripts you read always seem so clear, but as soon as you start writing your own you find yourself lost in a Hell of inscrutable data types and inadequate documentation. AppleScript is almost Satanic in how it tempts you. Let me start this post by saying that I hate AppleScript.
0 Comments
Leave a Reply. |