Page 1 of 1

Applescript and iTunes

Posted: Tue Mar 11, 2014 10:35 pm
by Mag
I'm using this script to get the list of iTunes playlists:

Code: Select all

    tell application "iTunes"
        get name of playlists
    end tell
Unfortunately it returns also the names of the "standard" playlist (as "Library", "Music", Movies", TV Shows", "Podcasts", "iTunes U", "Audiobooks", "Purchased").

Is there a known way to remove this items from the list? I could do it with a replace command but I guess that it don't work in non-English localized systems.

:roll:

Re: Applescript and iTunes

Posted: Wed Mar 12, 2014 12:16 am
by Zryip TheSlug
Hi Mag,

Did you try?

Code: Select all

tell application "iTunes"
	get name of playlists whose special kind is none
end tell


Best,

Re: Applescript and iTunes

Posted: Wed Mar 12, 2014 11:18 am
by Mag
Thank you Zryp.

I get a compiler error :(

Re: Applescript and iTunes

Posted: Wed Mar 12, 2014 8:42 pm
by Zryip TheSlug
Hi Mag,
I get a compiler error :(
The script is working here.

Could we check the result inside the applescript editor before to execute it with LC?

Open the Applescript script editor and copy paste the script, then run it by clicking the green button. What is the result?



Best Regards,

Re: Applescript and iTunes

Posted: Thu Mar 13, 2014 10:43 am
by Mag
Oops, sorry, you're right. I inserted an error in the script, now I corrected it and your code works fine. Thank you!