Use an AppleScript to remember iTunes play positions

Dec 01, '03 10:24:00AM

Contributed by: Anonymous

Does digital out-do analog every time? Does DVD always beat Video Tape? Do MP3s wipe out Audio Cassettes? Well, quality wise, yes. But the old techs were 'stateful;' they didn't forget! DVDs, MP3s, CDs don't keep where they got to when you last played them. Take a DVD out of your player and, unless you have an expensive deck, you've lost your position. Quit iTunes, and there's no way to save where you were at.

Here's a short script that uses the 'start' field in iTunes to record where you got to for any MP3. For a long audio book MP3, it's invaluable!


on idle
  try
    tell application "iTunes"
      copy the player position to current
      copy the start of the current track to startTime
      if current > startTime then
        set the start of current track to current
      end if
    end tell
  end try
  return 15
end idle
When saved as a stay open application, every 15 seconds the script polls iTunes for the current playing position and saves it with the track. Now quitting doesn't lose your place. Fiddle with the start setting for the MP3 (Command-I, Option tab) to reset the start time when needed.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031124150312458