[Pythonmac-SIG] controlling iTunes with appscript

Jamie Stuart jamie at eurotalk.com
Tue Nov 28 17:42:32 CET 2006


Hi,
I'm completely new to Python and something is evading me completely. I'm 
using appscript to add (and convert to mp3) a bunch of .aif files to 
iTunes. I also want to create a new playlist which they are all added to 
and then tagged. This is what I have at the moment:

itunes = app(id='com.apple.itunes')
itunes.run()
itunes.make(new=k.playlist, with_properties={k.name:'New Playlist'})
addfile = itunes.add(Alias (outputfile), to=itunes.playlists['New 
Playlist'])
convertfile = itunes.convert(addfile)
itunes.delete(addfile)


The resultant mp3 file doesn't appear in the playlist - only in the 
library. Also, how do I tag the files (title, artist, album?) as I can't 
see how this would be done.
Another thing is how can I package up appscript so this thing can be 
distributed on CD-ROM?
Any help much appreciated!

Jamie


More information about the Pythonmac-SIG mailing list