[Pythonmac-SIG] Adding a track to an iTunes playlist (appscript)
Alastair Rankine
arsptr at optusnet.com.au
Thu Oct 20 11:32:18 CEST 2005
On 20/10/2005, at 6:26 PM, David wrote:
> app('Itunes').sources['Library'].playlists['Library'].duplicate
> ( a_track, to=a_playlist )
>
> and many variations of it. But all I get is an error saying "Too
> many direct arguments".
>
> Can anyone spot what I'm doing wrong?
Yep, duplicate is a method of the application itself, not the
playlist. You need something like:
a_track = app('Itunes').playlists['Library'].tracks[0]
a_playlist = app('Itunes').playlists['Whatever']
app('Itunes').duplicate(a_track, to=a_playlist)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20051020/4f4e8d55/attachment.html
More information about the Pythonmac-SIG
mailing list