Archive: November 2004

november 30 '04 - 12:00 am
Doug's Podcast for November 30, 2004

My latest Podcast is available. It has been encoded as an AAC file and is bookmarkable--why didn't I think of that before? Load it up in your newsreader or podcasting software, dump it to iPod, and enjoy!

november 28 '04 - 12:00 am
Good Read

New York Times writer John Schwartz says To Know Me, Know My iPod.

november 27 '04 - 12:00 am
Snuck One In There

"Snuck"? Is that a word? I snuck a tiny update of Import iPod Audio Files in yesterday that Swedish users should appreciate. Friendly Correspondent Magnus Gunnarsson (whose sister is getting married today! Cheers!) has been having trouble with the 24 hour time format. Once again, thick-skulled Amerkin that I am, I was completely ignorant of the fact that some countries use a "." rather than a ":" to separate hours and minutes in a time string. So the script now accounts for that and is up to version 1.7.1. Magnus said it worked fine, but because of the aforementioned nuptials, over which he is toastmaster, he wouldn't get a chance to import his entire iPod library til after the festivities...or whenever the hangover wears off. Thanks Magnus, most sincerely!

BTW: Snuck Is a Word

Works for me!

november 26 '04 - 12:00 am
Updated: Import iPod Audio Files v1.7

Import iPod Audio Files v1.7 has now been posted. This script will enable you to select tracks on your iPod and transfer their files to your Music folder, after which the files are added to your iTunes library--and copied into a discrete playlist, if you wish. Latest version handles international localizations better (though not all languages; please keep me informed), transfers ratings tags, handles 12 or 24 hour time formats (required to assist in locating files by modification date), copes with backslash characters in Album or Artist names. Thanks to the many Correspondents who helped with suggestions, additions, and beta testing.

november 23 '04 - 12:00 am
Latest News on Import iPod Audio Files

I am close to finishing up the new version of Import iPod Audio Files. The next version will include some fixes and features, including: support for 12 or 24 hour time formats (used to determine the modification date of the selected iPod file); ratings transfer; fix problem with Album and Artist names containing backslashes; better (but not perfect...yet) localization support. Thanks to the many Correspondents who have assisted with suggestions and beta testing, and for being patient!

Updated: Export Via QuickTime v1.1

A Correspondent alerted me to the "no tracks selected" error in Export Via QuickTime. This is a script that will enable you to open and export the files of the selected iTunes tracks to a user-chosen folder using one of QuickTime Pro's audio formats: 3GPP, AIFF, AVI, Hinted Movie, muLaw, MPEG-4,QuickTime Media Link, QuickTime Movie, System 7 Sound, and Wave. Anyway, I have updated it to fix the error and it should work fine now.

november 22 '04 - 12:00 am
Import iPod Audio File Localizations

I have had some very helpful responses to my query about getting the localized names of file kinds, which will help fix the "ext not defined" error some are experiencing with Import iPod Audio Files. Also, there have been some problems using 24 hour time formats (once again, being a dumb-ass Amerkin, I forget that not all countries use AM + PM). I have already received a fix on the time problem from a Correspondent, so its just a matter of incorporating all the fixes into a new version, testing, etcetera. Look for a new version in a day or so.

Gotta Love the CSS min-width property

Being an old-school HTML guy, I'm conscious of keeping my HTML pages expandable. Unfortunately, while this allows for making the page as big as the browser window, it also forces the page to be as small as the web browser window. In this latter case, the outer columns could crush the center column (which is generally where one finds the cream of the correspondence). Enter the CSS min-width property, which enables the pages of a site to expand to any size, but only collapse to a specified size. Yahoo! It's now employed here as a property of the html element; page sizes will now be a minimum of 900 pixels.

Updated: Block Party! v1.1

Here is the updated version of Block Party!. This script will create a special playlist containing random Artists and a specified number of their randomly chosen tracks, such that the tracks will play "in-a-row" fashion. New features include the option to select a particular playlist to use as the source for Artists and tracks; option to limit the size of the playlist by time length; better error checking. ReadMe explains details and contains some mods you can easily make to the script yourself.

november 20 '04 - 12:00 am
Coming Soon: An Update to Block Party!

Thanks to some very good feedback from Correspondents, I have been working on an update to Block Party!. The new version, which I'll probably put up on Monday, has the option to select a Smart Playlist to use as the source of Artists and their tracks (allowing you to use a Smart Playlist created by particular Genre for instance, or whatever qualifying criteria you like, as the source of tracks). Also also, you will the option to be able to set a maximum time for the "Block Party" playlist, rather than just the number of Artists. Also also also, I've put some better error detection in to prevent infinite looping if your "Block Party" playlist criteria isn't met--this could happen if you don't have enough Artists with enough required tracks to meet your size limitations. Anyway, I thought I'd let you know.

november 18 '04 - 12:00 am
Gizmodo.com Rules!

Where have I been? Gizmodo.com mentioned my Podcast today and I'm getting a tidal wave of hits from 'em! What a great site! Bookmark 'em! NOW!

iPod Crash After Applying Make Bookmarkable?

The comments thread in this Mac OS X Hints hint suggests that there may be a problem using Make Bookmarkable, which converts selected AAC tracks you have ripped to "bookmarkable". Apparently, newer iPods will refuse to wake from sleep after playing a monaural file converted by the script. I have not experienced this phenomenon. But if you have then let me know. I doubt it is the script's fault, and more likely how iPod software is interpretting the converted file.

International Import iPod Audio Files Assistance

I receive a few emails from non-English users of Import iPod Audio Files complaining that they get an error when the script is trying to identify the kind of a selected track. The reason this happens is because the script is looking for the US-English names of the kinds of the tracks. Being a pig-headed Amerkin, I dunno the non-English names for these track kinds. The script now looks for MPEG audio file, Protected AAC audio file, AAC audio file, AIFF audio file, WAV audio file, Apple Lossless audio file. Well, in Sweden, for example, these are (probably) "MPEG-ljudfil", "Skyddad AAC-ljudfil", "AAC-ljudfil", "AIFF-ljudfil", "WAV-ljudfil", and "Apple Lossless-ljudfil".

Do you see the dilemma?

I have prepared a script that will paste the kinds of your tracks to the clipboard so that I can (or you can) edit the Import iPod Audio Files script to correctly access the kind of your selected tracks. And here it is:

tell application "iTunes" to set all_kinds to (get kind of file tracks of library playlist 1)

set the_list to (my get_discrete_list_of(all_kinds))

set new_text to ""
repeat with a from 1 to length of the_list
   set new_text to new_text & (item a of the_list) & return
end repeat

set the clipboard to new_text

display dialog ?
       "The clipboard now contains a list of the file kinds in your iTunes Library." & ?
   "Please paste the contents of the clipboard to an email or text document so I can see it!" buttons {"Thanks!"} default button 1

to get_discrete_list_of(list1)
        script a
          property list1ref : list1
       end script
  
    set list2 to {}
   script b
          property list2ref : list2
       end script
  
    repeat with i from 1 to length of list1
                set this_item to item i of a's list1ref
           considering case
                   if this_item is not "" and this_item is not in b's list2ref then set end of list2 to this_item
         end considering
     end repeat
  
    return b's list2ref
    
end get_discrete_list_of

Just run it from iTunes or Script Editor and it should produce a list of all the track kinds in your library and put it in the clipboard. Then you can paste it someplace safe, like a text doc or an email. If you want to send me your list (non-US users only, please) I'll see if I can create an Import iPod Audio Files script that works correctly with your language.

New: Block Party!

Being a former radio guy, I've worked my share of "Block Party Weekends", "Twofer Tuesdays", "Double Edge Weekends", "Triple X Weekends", and so on. Correspondent Jeff Click suggested that a script might acomplish making a playlist of randomly selected artists and a specific number of random songs for each artist. Loving a challenge, I've got Block Party! ready to go. Just tell the script how many Artists you want and how many of their Songs you want in a row, and a "Block Party!" playlist is generated. (Here's a screenshot of an example playlist.) I really like this script! Thanks, Jeff.

november 17 '04 - 12:00 am
Doug's Podcast Debuts

I'm pleased and excited to announce the debut of Doug's AppleScripts for iTunes Podcast. A Podcast is an audio presentation delivered by an RSS feed. It can be downloaded and added to iTunes (or any audio player) and added to iPod for portable listening. You can, of course, load a Podcast to any portable player, but Podcasting has been most associated with the iPod. (If you want to learn more about Podcasting, visit iPodder.org.)

In Doug's Podcast, I talk about the latest AppleScripts posted at the site, tips and info, and other stuff I think AppleScripting iTuners might find interesting. It's a 5MB download and goes for about ten minutes. I hope to produce a new Podcast about every two weeks.

To learn how to subscribe to Doug's Podcast with your newsreader, or with Podcasting software such as iPodderX or iPodder, be sure to read Doug's Podcast Information.

Additionally, if you subscribe to the Podcast feed with NetNewsWire from Ranchero Software, I have written an AppleScript called Get Doug's Podcast in NNW that will download the Podcast from NNW and add it to iTunes. Just put it in NetNewsWire's Scripts folder, select the feed, and run the script. The script's accompanying ReadMe explains more.

I think Podcasting will be a fun way to deliver news and info about the site. Plus, it's a natural for me. I'm an audio producer by profession (and former radio guy) so producing my own 'cast, in addition to the "geek factor" of delivering it, makes my qi flow good.

november 11 '04 - 12:00 am
Goodbye Audion

Tonight I (and many other registered Audion users) got an email from Cabel Sasser of Panic Software announcing that Audion is officially being retired. Audion is/was a great MP3 player and I'm sorry that it won't be developed any further. More illustrative info here. Thanks for the great times, guys!

november 10 '04 - 12:00 am
Updated: Remote Management Scripts v1.2

I have updated the Remote Management Scripts collection to v1.2. There were several scripts that needed to be fixed to work around the iTunes 4.7 selection bug. This collection of scripts will assist you in managing shared tracks and playlists on a remote machine over a network via iTunes on the local machine.

Edit Track Info - Edit a selected shared track's name, artist, album, composer, EQ, genre, play count, rating, volume, and year.

Remove From Playlist - Remove selected shared tracks from selected shared playlist.

Delete Playlist - Delete the selected shared playlist.

Selected Tracks to Playlist... - Copy the selected shared tracks to a new or existing shared playlist.

Add Selected Remote Tracks - Copy the files of selected shared tracks to the local computer and add to iTunes.

Add Selected Local Tracks - Copy the files of selected local tracks to the remote computer and add to its iTunes.

Requires configuring with administrative privileges and Remote Apple Events enabled. Read Me includes instructions on setting up.

mvyradio

I live in Providence, Rhode Island, which is a stone's throw and half away from Martha's Vineyard, Massachusetts. There's a very cool radio station there called WMVY. It's actually owned by a guy I used to work with. It's a very cool station and they play a wonderful mix of music. Well, guess what? Now YOU can get 'em on iTunes radio. They're listed as mvyradio in the Eclectic section of your iTunes radio playlist. Now I can recycle that coat hanger and aluminum foil I've been using to try and pick 'em up on my old Proton radio. Congrats, 'MVY!

november 5 '04 - 12:00 am
Updated: Import iPod Audio Files v1.6

Import iPod Audio Files is now updated to version 1.6. I have added several new features as well as fixing a couple of bugs. First, the bugs: apparently there has been a long standing problem with creating new folders in the designated Music folder ("Can't get folder" error), and this is fixed. Elsewise, the script is now better at narrowing down the correct file in the iPod by virtue of using the last modified date. Blank Album and Artist tags will now create "Unknown Album" and "Unknown Artist" folders correctly. Compilation tracks are handled correctly. Finally, I have added the ability to use the optional "ProgBar" application to display a progress bar of imported tracks. (Thanks to TJ Mahaffey of Spork Software!) "ProgBar" is included in the download along with information on how to install and use it--it's pretty simple and is purely optional.

See the entry below concerning possible import-recognition problems. As usual, let me know of any difficulties!

november 4 '04 - 12:00 am
Here's An Odd One

I have heard from a couple of Correspondents that Import iPod Audio Files does not always work correctly. This script will enable you to import the files of selected iPod tracks into iTunes. First, it doesn't work with Windows-formatted iPods, but that hasn't been the problem. It appears that some iPod tracks/files are unable to be recognized.

Here's how the script works: the size in bytes of each selected iPod track is used with the UNIX bash command "find". The size in bytes of a file is pretty much a fingerprint of the file. The "find" command attempts to locate a file of the same size (and correct file extension also) on the iPod and then it copies that file to your hard drive. It's pretty much infalible; but on the rare occasions when two or more files have the same file size, you are given the option to select the correct file.

Anyway...

Today I was testing an additional parameter to the "find" command. I was attempting to use the modification date of the selected file to help narrow the "find" parameters (it works). However, some files were being skipped over. Very inconsistent. Some files were always found and copied, others--very obviously meeting the "find" criteria--were just "not found".

Then I recalled the latest so-called "iTunes cannot get CD track names for songs that were not imported using iTunes." error message (I'll leave you to read the link). Anyway, I used the latest iTunes to re-import the tracks from CD that weren't being found, put 'em on the iPod, and Hoo Ya, they were imported correctly by the script. I don't know if the original "not found" iPod tracks were ripped by iTunes or not. I suspect they were actually ripped by Sound Jam ages ago. But there you go. Let me know if you experience a similar problem with the script.

By the way, I will be updating Import iPod Audio Files in a day or two after more testing. Cheers!

november 3 '04 - 12:00 am
Updated: Append to Selected Tag v1.1

More iTunes 4.7 selection bug fixes today. Append to Selected Tag will let you enter text and add it to the beginning or ending of the chosen tag (Song Name, Artist, Album, Composer, or Comments) of the selected tracks.

Updated: Multi-Import v1.1

Multi-Import will enable you to import the selected or enabled CD tracks using two or more encoders. Additionally, the new tracks can be added to discrete new playlists based on the encoder name (eg: "Beatles - White Album - AAC" and "Beatles - White Album - MP3".)

november 1 '04 - 12:00 am
iTunes 4.7 Selection Bug

I still have not received confirmation from Apple about the so-called iTunes 4.7 selection bug. But I think we all know it's there. In a nutshell?and at the risk of severely repeating myself?here's what goes wrong: when after selecting some tracks in iTunes and then running an application script (an applet) or running a script in Script Editor that uses syntax like this:

tell application "iTunes"
        set sel to selection
end tell

...you will get an empty list as the result. This, of course, is not what one would expect. What should happen is that you get a list of track references. Many scripts will either fail or report that no tracks have been selected, depending on how much error-checking the script uses.

This bug does not happen with compiled scripts or with any script that targets the selection of the front browser window, or front window or window 1.

I am trying to update my own scripts as soon as I can. However, if you wish to fix scripts yourself, all you need to do is make sure that any reference to selection targets the front browser window. So, to fix the script snippet above, you would do this:

tell application "iTunes"
  set sel to selection of front browser window
end tell

Also, make sure that any other references to selection (for instance count items of selection) also reference the front browser window.

tell application "iTunes"
  set len_sel to (get count items of selection of front browser window)
end tell

Let me know if any of my scripts you regularly use fail and I will try to fix them as soon as I can. Thanks!

This column is printer-friendly.
Site contents © 2001 - 2010 Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com.
All rights reserved. Legal.
AppleScript, iTunes, and iPod are registered trademarks of Apple Inc.
Image 01 Image 01 Image 01 Image 01 Image 01 Image 02 Image 03 Image 03 Image 03 Image 03