Get iTunes database information with Applescript

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

  1. BlakTornado Guest

    BlakTornado

    Joined:
    Apr 24, 2007
    Location:
    Washington, OH
    #1
    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)

    Code:
    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

    Joined:
    Oct 15, 2007
    #2
    Code:
    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