Another useful script, check if the maximum number of responses has been received, and, if so, closing the form (also opening and closing on particular date/time). Here.
Another useful script, check if the maximum number of responses has been received, and, if so, closing the form (also opening and closing on particular date/time). Here.
I use Google Forms for event registration, and the notification email from Google is nice, but I want to be able to send an email to people after they’ve registered, possibly including information which is not on the generally available form.
Here are the steps involved:
When anyone submits the form, they’ll get an confirmation email in HTML. You will be included in the BCC.
Funny, I forgot one of the “classic” scripts which is very simple but quite useful.
This one refreshes your library with information found in the actual files associated with each library entry. So it has two effects: finds all “dead” tracks (tracks for which their is no corresponding media file) without you manually having to “Get Info” on a track and then sit holding ALT+N (on Windows) to go to the Next track while iTunes opens ever track in your library and updates any information in the file which is different from the library entry (for example, if you copy updated tracks from a second iTunes library and have updated the entries via your other iTunes library).
RefreshFromFile.js
One other thing that is very important to me is debugging.
Now I am very much not impressed by the default Windows Javascript debugger, so I use a lot of logging of operations. This is rarely mentioned by others, so I bring it up here.
Having popups with WScript.echo() drives me crazy (I won’t click “OK” 1000 times while running a script to find tracks without artwork in my library) and having the default debugger pop up means that there is a problem with my Javascript.
So I do a lot of logging of operations, stuff like this:
var logFile = fso.CreateTextFile("CopyAlbumArtwork.log", true);
Then I can write progress information to this log file and review what works and what doesn’t; eventually taking manual actions to resolve problems (like a weird song with the album name in Japanese characters).
Over the past months (nay, years) I have been cleaning up my music library. I have used different tools and services (including paying ones like Tune-Up). But, I am lazy, my goal has always been to automate things as much as possible. So I was very happy to find various scripts which will, for example, search for “dead” tracks (tracks for which their is no corresponding media file) rather than having to “Get Info” on a track and then sit holding ALT+N (on Windows) to go to the Next track while iTunes opens ever track in my library to see how many “broken” links I have.
I have found a few different sources (some of which are just copies of each other or copies of examples from Apple) to “Manage iTunes on Windows using JavaScript with the iTunes SDK”. Obviously, there is also the iTunes COM Windows SDK which includes a few JS samples.
Here are a couple of links to other sources of Javascript for iTunes.
OttoDestruct
EverythingiTunes
Brian Ander
Here is also a good site with the COM interface of iTunes.
Now, for me, these are good resources, but what I am missing is some more powerful and tricky scripts. For example, I have recently subscribed to iTunes Match so that I can upgrade my older MP3 ripped music into higher bitrate audio (e.g. 256 kbps AAC).
The problem that I have with this is that the “Matched AAC audio file” that iTunes Match allows me to download has my iTunes account stamped into it. So what if I want to share this audio file with family or friends? What happens (hopefully far in the future) when I die and my iTunes account is no longer active and iTunes Match is turned off?
Well, basically, I’d like to have the audio files in a format which I own, not which Apple controls (e.g. “AAC audio file”, not “Matched AAC audio file”).
And now, here comes the reason for this posting. I have several playlists of hundreds and thousands of songs. Most of those playlists are built from converted (MP3) and purchased (“Purchased AAC audio file”) tracks, so I can’t upgrade from MP3 files or Purchased AAC to Matched AAC audio files and then and delete the MP3 or Purchased version.
So, I started working on somewhat more complex scripts which would help me smoothly upgrade my collection to clean AAC audio files without the traces of purchase or iTunes matching.
These scripts are not perfect and certainly need some upgrading, but as I find them useful you might as well.
To use any of these scripts, just download them, save them to a file with a name ending *.js file, then run them like any other program (double click, select and press enter, type the name from a command prompt, etc). If you have the Windows Scripting Host installed on other Windows boxes (installed by default), then the wscript.exe program actually runs the scripts, much like cmd.exe runs batch files. The scripts connect to iTunes as a COM object and use it in that fashion.
Thanks for reading!