Get the last playlist of a folder in iTunes
Hi,
I'd like to get the last playlist of a folder playlist in iTunes and integrate it with Automator.
I'm a very beginner in AppleScript but familiar with OOP (ex AS3 dev) so I looked for the doc in script editor where I can see :
folder playlist n [inh. user playlist > playlist > item] : a folder that contains other playlists
So, if I understand well, a folder playlist is an item and I have to get the item 1 of the folder playlist to work with it but after that I don't know what to do.
Here is my script :
on run {input, parameters}
set folder_p to input
tell application "iTunes"
set itm to ((item 1) of folder_p)
end tell
return itm
end run
But itm is exactly the same than folder_p and I don't know how to get the last playlist.
Any idea ? Thx a lot.