Your search query "linkto%3A%22MacPython%2FiTunes%22" didn't return any results. Please change some terms and refer to HelpOnSearching for more information.
(!) Consider performing a full-text search with your search terms.

Clear message

Does anyone know how to add a track to a playlist using appscript?

Maybe something like this:

def add to playlist(a, t, pl ):

Find a connected ipod making no assumptions about the name of the ipod:

from appscript import *

def find_ipod( a ):

ipod = find_ipod( app('Itunes') )

Find the library making no assumptions about the name of the library (e.g. for non-english versions of itunes it's not "Library"):

from appscript import *

def find_library( a ):

library = find_library( app('Itunes') )

Create a new playlist on a certain source (i.e. either the library or an ipod, as returned from one of the functions above).

src.make( new=k.user_playlist, with_properties={ 'My new playlist'} )

Unable to edit the page? See the FrontPage for instructions.