[iTunes] applescripts for iTunes playlists

Bill White billwhite at mac.com
Fri Feb 17 10:33:00 PST 2006


On 2/16/06 9:19 PM, Terry Pogue <tpogue at comcast.net> wrote:

> I downloaded a nice little applescript which creates a textedit of  all the
> playlists. This is really helpful to me. I would love to be  able to print out
> a list of the tracks within a playlist. Is there an  applescript for that?

Here¹s a simplistic script, Terry. It asks you to choose a specific playlist
and then creates a new TextEdit window with the playlist¹s name and the
names of all of its tracks. It would be easy enough to tweak it to include
artists, etc, if you want that info, too. It would also be easy enough to
assemble a large text file containing all playlists and their corresponding
tracks.

HTH,

Bill

-----------------------

tell application "iTunes"
    
    set myPlaylists to name of every playlist
    
    set thisPlaylist to item 1 of (choose from list myPlaylists without
empty selection allowed and multiple selections allowed)
    
    set trackNames to name of every track of playlist thisPlaylist
    
end tell

set playlistText to thisPlaylist & return & "--------"

repeat with i from 1 to count trackNames
    
    set playlistText to playlistText & return & item i of trackNames
    
end repeat

tell application "TextEdit" to make new document with properties
{text:playlistText}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.themacintoshguy.com/pipermail/itunes/attachments/20060217/ca0edc88/attachment.html


More information about the iTunes mailing list