Re: reiterating over a playlist
Re: reiterating over a playlist
- Subject: Re: reiterating over a playlist
- From: Jon Pugh via AppleScript-Users <email@hidden>
- Date: Sat, 18 Apr 2020 18:02:43 -0700
On Apr 18, 2020, at 2:40 PM, iKel via AppleScript-Users
<email@hidden> wrote:
>
> song by artist
tell application "iTunes"
tell playlist "The Hits"
set trackItems to {name, artist} of every track
end tell
end tell
set itemCount to number of items in item 1 of trackItems
set outputString to {}
repeat with i from 1 to itemCount
set itemSong to item i of item 1 of trackItems
set itemArtist to item i of item 2 of trackItems
set itemLine to itemSong & " by " & itemArtist
copy itemLine to end of outputString
end repeat
set text item delimiters to return
outputString as string
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden