Our Favorite iPod AppleScripts | iLounge Article


Our Favorite iPod AppleScripts

Want to enhance your quality of life, save time, and reduce the incidence of repetitive stress injuries? Well here’s how, using some of our favorite iPod AppleScripts.

Bookmark Magic

If you havenít heard of Bookmarking before, you might wish you had. When an AAC audio file has been so annointed, you can return to the track at any later time and have it pick up right where you left off. Audible has included Bookmarking in their audio book AACs. And you thought bookmarks for plain old regular books were super convenient!

Apple revealed in a briefly-posted Knowledge Base article (#93731, now removed) that all you have to do to make an AAC file bookmarkable is change its file type to the four-character “M4B ” (that fourth character is a space). This is different from the file extension, which would be “m4a” or “m4p”. Apple suggested using a “third-party” file editor, but somebody there forgot that Appleís own “first-party” AppleScript is capable of the job. Make Bookmarkable is an AppleScript that you can run from iTunesí Scripts Menu that will change the file type of the selected AAC tracks (protected and non-protected) so that they are bookmark-groovy.

For audiobook listeners who rip their own books, being able to make imported files bookmarkable is bliss. Set a track in iTunes as bookmarkable, copy it to the iPod, play it back, and itíll pick up playing right where you stopped it in iTunes! Too awesome.

Morning Routine

You know how some people read Sports Illustrated or Marie Claire or, for lack of anything else, the mode d’emploi on the labels of hair products in the bathroom? Well how about reading your iPod?

The latest versions of iPod software allow you to copy and view text files as Notes in the iPod, which is nice if you like portable reading. Unfortunately, itís only nice if you like little Notes (they can only be 4kb in size).

The iPod can still read vCard-type Contacts, and the vCard format is pretty cool. It’s not just for contact info Ė they can hold a lot of text! Clipboard to Contacts segments text of any length from the clipboard into many vCards and writes them to the iPod “Contacts” folder. Just select the text you want in Safari (or from anywhere text is sold) and copy it, then run the script from the Script Menu. The script will want you to name the file it will create, and that’s it.

A vCard file can be any length. However, scrolling is stifled when the individual vCard entries get very big. One great thing about the vCard format is that each vCard needn’t be in a separate file, they can all be part of a single file. So this script segments the text into scroll-safe chunks, and titles the vCard entries sequentially, so all you need do is pick the first one in listed in the Contacts folder, and use your Next and Previous buttons to skip back and forth between the sequential segments. (If you’ve never done long-format reading in the iPod, you will soon develop some amazing new eye/scroll-thumb coordination abilities. My PlayStation Dual Shock handling is noticeably more precise.)

By the way, if you happen to use the excellent RSS newsreader NetNewsWire from Ranchero Software, the script NNW Subscriptions to iPod Contacts will copy the selected news items as Contacts to the iPod. We love that script.

How Smart Is Your Smart Playlist?

If a track plays on the iPod, naturally its play count is increased. But this information isn’t beamed back to the respective file on your computer. Nor is the last played date. So, for example, “Hey Ya” on your iPod could be played 10 times, while the one in iTunes is only played once. Even if you like “Hey Ya”, after hearing it 10 times via iPod it might time for a rest. How can you keep it from playing again too soon in iTunes?

If you frequently replenish your iPod with tracks from the iTunes mothership, now you can make sure that your iPod play counts actually count and the last played date of a track is for real. The script Synch iPod-iTunes Data, written by Greg Townsend, synchronizes select data between your iPod and iTunes. The data that can be synchronized are “Date Last Played”, “Play Count”, “Rating” and “Comments”. The data can be transferred from iPod to iTunes or the reverse, or can be synchronized between the two.

This script works great in conjunction with a Smart Playlist which you have set to keep live-updated with tracks by last played. Have it automatically update to iPod. Then, by ensuring that you synch the “Date Last Played” and/or “Play Count” of the iPod tracks with their respective iTunes tracks, you’ll keep the Smart Playlist honest.

Two Reasons To Be Cheerful

It’d be nice if you could import tracks directly from CDs to your iPod, wouldnít it?

Fortunately, there’s Rip To iPod. Rip to iPod is an AppleScript that imports each enabled CD track to iTunes and immediately copies it to the iPod, deletes the file, and removes the track from the iTunes library, giving the appearance of seamless CD-to-iPod importing. This is great for people who want to load their iPod up but keep their hard drives free of extra files.

Wipe Out

Sadly, we hear variations of this 911 about every other week: “I need help really bad. I accidentally deleted my iTunes library. However, I have not plugged my iPod back in to iTunes, so all the songs are left on the iPod. Is there anyway I can get them back? I am really worried about this.”

That’s a scary thing, no doubt. There’s also an unstated concern here that the iPod battery will run out of juice if they don’t plug it in soon and that they’ll lose everything on the iPod. And further adding to the anxiety pile is the notion that if they do plug it in, iTunes will automatically update a whole lot of nothing to the iPod!

Whenever youíve accidentally deleted your entire library (and who hasnít - ahem), re-mount the iPod while holding the Command and Option keys, which disables automatic updating. If you own a Generation Dock-less iPod you may want a second person to help with this maneuver because it’s wicked hard to do with just the hands you got - unless you are able to also use your chin to hold the keys down. Then set iPod Options to “Manually manage songs and playlists”.

Now, how to get the files back. iPod Help says “You can’t transfer music from iPod to iTunes.” But you can. You just can’t do it they way you think you can. The audio files in iPod are stored in a Super Double-Secret invisible folder. Yes, invisible…to the Finder. But not to Terminal or AppleScript.

And that’s where John Paul Davis’ Import Selected iPod Tracks comes in. This script will copy the files of the selected iPod tracks to your computer, and add them to iTunes. If you’ve lost your entire iTunes library at least the iPod files can be salvaged.

So those are just a few of the ways AppleScript can help deepen your relationship with your iPod. If you need more information or more AppleScripts, come visit the authorís site. And above all: have fun!

¬ę Praise for Apple’s iPod Warranty Support

Final: iPod mini battery tests ¬Ľ

Related Stories



WOW! the first tip on bookmarking is amazing. I had no idea about that.

Thats just awesome. Would be great for DJ albums people don’t feel like breaking up.

Or for long speeches, I can’t think of why i’d need it, but i know when i do, it will come in handy.

Posted by Jon on March 10, 2004 at 5:44 AM (PDT)


Awesome—the Rip to iPod script is worth its weight in gold to me!


Posted by Matthew on March 10, 2004 at 11:02 AM (PDT)


Hmmm so far in my experience using iTunes-iPod and automatic synching of a Smart Playlist with iPod, the play count and last played DO get updated (the last played are often times between 8 am and 5 pm when i’m away from my computer).

Posted by Mike K in Brazil on March 10, 2004 at 11:24 AM (PDT)


Is there any way for someone to change these programs to be usable on a PC? That Synch iPod-iTunes Data script sounds really great.

Posted by wolfman200 on March 10, 2004 at 11:50 AM (PDT)


Mike K,

The Synch iPod-iTunes Data script is for people who manually manage their iPods.

Posted by Doug Adams on March 10, 2004 at 11:53 AM (PDT)


thanks so much for the article!  i love the bookmarking script.  you rock!

quick question - do you have a script that can change the file back to m4a or m4p?

Posted by jp on March 10, 2004 at 12:21 PM (PDT)


I could not get the bookmarking script to work at all.  Any ideas?

Posted by DKG on March 10, 2004 at 3:52 PM (PDT)


is there any way to get bookmarking in itunes for windows?

Posted by hello on March 10, 2004 at 7:45 PM (PDT)


Wow, this is poopy!

Posted by poopy on March 11, 2004 at 5:41 PM (PDT)


Rip2ipod is really a cool thing! Just one problem (I am newbe, maybe the solution is obvious): one can’ t use automatic synch after that, because all the files on the ipod being not on the hard disk of the Mac are deleted then…

Any idea to solve this? Would like to automatically synch my playlists AND keep some additional music tracks on the ipod, but not on my hard drive…

Cheers, nio

Posted by nio on March 13, 2004 at 4:14 AM (PDT)


Wonderful article! I peeked at the Applescripts, then connected the iPod to my Mac, opened Terminal, and ‘ls’d the ‘hidden’ music files. (Not that I want to tinker with them; I just like knowing where things are.)

Posted by Beth C. in Massachusetts on March 13, 2004 at 5:34 AM (PDT)


Yikes. Perhaps a better place to post yer questions would be at the iTunes AppleScripts forum here at iPodlounge. Thanks!

Posted by Doug Adams on March 13, 2004 at 12:43 PM (PDT)


I was going to post the same note as Mike K above (with regards to “Synch iPod-iTunes Data” not being necessary.)  This particular feature, that my iTunes “knows” what my iPod has recently played, and how many times I played them on the road, has always been my favorite “show off” feature.

(It’s this sort of tight integration that only Apple would spend time on and perfect, and makes the iPod stand tall on top of all the other MP3 players.)

Of course though, I automatically update my iPod.  I’ve selected about 10 smart playlists and 5 regular ones from my 80+ GB library, and now every time I plug the 20 GB iPod in its gets refreshed with about 15 GB of music (and audio books) I want to listen to.

Make sense that the tip only applies to those that MANUALLY update their iPod.  Perhaps the article should make this clear.

Posted by Josh on March 15, 2004 at 7:45 AM (PDT)


AWESOME.  I love the Import script - I have lost many of my CDs but have put them on my iPod via my friend’s computer/music collection.  Now I am able to back up the files on my own computer!!!

Posted by Jim on March 15, 2004 at 4:42 PM (PDT)


I want to put a song from a CD onto my ipod but I want to eliminate the first 20 seconds of the song.  How can I do that?

Posted by Lee on March 18, 2004 at 5:50 PM (PDT)


will john paul davis’ applescript only work, if the itunes library is empty? or will it just work automatically without any confirmation message?

i can’t seem to make it work. it is not stated, if the script works with panther (which i cannot imagine).

Posted by redAPPLE on March 20, 2004 at 2:41 AM (PDT)


whenever I plug in an ipod with a different library than that on my computer it asks me whether I want to sync them or not with the default option as “no.” And I have it on automatic update

Posted by evan on March 22, 2004 at 7:09 PM (PDT)


I found the tip about bookmarking elsewhere on the web yesterday. I use windows and was very pleased to find that simply renaming m4a files to m4b allows this feature to work.

After renaming I needed to drag the files into iTunes, then clear the duplicate entries that were already there.

To get the files to go to the iPod, I needed to go to the iPod options and set the only sync checked songs option. I then unchecked these “books”, and sync’d. Now the files were not on the iPod. Then I changed the options back to auto, sync’d again and the m4b files were on the iPod.

The bookmarking feature works great. You can even listen to a point on iPod or iTunes, sync, and the bookmarks get sync’d.

Posted by Tom Bergman on April 14, 2004 at 12:32 AM (PDT)


Is there anyway to use the smarter smart playlist on window xp?

Posted by Mike on April 25, 2004 at 1:16 PM (PDT)


I have not yet figures out if there is a way to run scripts in my “PC” version of Itunes…
Can I run the same scripts made for Mac?
Thanks for any insight anyone can give.

Posted by norsk79 on May 15, 2004 at 7:12 PM (PDT)


hi there. when i import cd tracks to my library in itunes, the tracks register but come up as 0.00 secs and i cant play them. can somebody please help. thanks

Posted by shaz on May 25, 2004 at 7:35 AM (PDT)


ur cool

Posted by hollyu on June 21, 2004 at 6:07 PM (PDT)

If you have a comment, news tip, advertising inquiry, or coverage request, a question about iPods/iPhones/iPad or accessories, or if you sell or market iPod/iPhone/iPad products or services, read iLounge's Comments + Questions policies before posting, and fully identify yourself if you do. We will delete comments containing advertising, astroturfing, trolling, personal attacks, offensive language, or other objectionable content, then ban and/or publicly identify violators.

Commenting is not available in this section entry.
Sign up for the iLounge Weekly Newsletter


Recent News

Recent Reviews

Recent Articles

Sign up for the iLounge Weekly Newsletter


iLounge is an independent resource for all things iPod, iPhone, iPad, and beyond.
iPod, iPhone, iPad, iTunes, Apple TV, Mac, and the Apple logo are trademarks of Apple Inc.
iLounge is © 2001 - 2014 iLounge, Inc. All Rights Reserved. Terms of Use | Privacy Policy