Get iTunes database information with Applescript

Discussion in 'Mac Programming' started by BlakTornado, May 30, 2008.

  1. BlakTornado Guest


    Apr 24, 2007
    Washington, OH
    I'm making an Applescript (my first serious one) and I'm wondering on how I would get, for example, the track artists for EVERY artist in the user's iTunes library.

    currently I have this code: (and the accompanying that does the rest)

    tell source "library playlist" to get info for 
    But I can't seem to find out what I would need to put after the "for" to get a list of, say, the artist column in the iTunes library.

    Would I need to set something like "tell track "all" to get info for "album artist"?

    I don't know. I'm only a newbie and started working with Apple Script two days ago... so please be lenient with me! thanks! :)
  2. hhas macrumors regular

    Oct 15, 2007
    tell application "iTunes"
    	set artistNames to artist of every track of library playlist 1
    end tell
    If you need to sort the resulting list and eliminate duplicate entries, that's another job.

Share This Page