Re: Grab list of album names in iTunes?
Re: Grab list of album names in iTunes?
- Subject: Re: Grab list of album names in iTunes?
- From: Graff <email@hidden>
- Date: Tue, 03 Feb 2004 14:54:31 -0500
This seems to work for me:
-------------
tell application "iTunes"
album of every track of playlist "Library"
end tell
-------------
This will return an unsorted list that has duplicate album names. You
still have to remove the duplicates on your own. I suggest writing to
a file and then using the shell commands "sort" and "unique". Here's
an example:
-------------
tell application "iTunes"
set albumList to album of every track of playlist "Library"
end tell
set filePath to ((path to desktop) as text) & "Test"
set theWriteFile to open for access filePath with write permission
set {oldDelims, AppleScript's text item delimiters} to {AppleScript's
text item delimiters, ASCII character 10}
write (albumList as text) to theWriteFile
set AppleScript's text item delimiters to oldDelims
close theWriteFile
set filePOSIX to quoted form of POSIX path of filePath
set uniqueText to do shell script "sort -f " & filePOSIX & " | uniq"
set uniqueList to every paragraph of uniqueText
-------------
- Ken
On Feb 3, 2004, at 1:45 PM, Mark Dawson wrote:
I'd like to compile a list (unique) of albums in my iTunes library.
Is there a way to do this? I could do a loop for every track and
access the "album" part of the track, but that would give me lots of
duplicate album names.
Thanks!
Mark
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.