In article
<e972b1b5-848e-43b8-bda4-1579c07557b0.TakeThisOut@f63g2000hsf.googlegroups.com>,
fursten <msvantesson.TakeThisOut@gmail.com> wrote:
> I'm trying to write a script that given a file adds it in Party
> Shuffle (in iTunes).
>
> It looks like this
>
> on open argv
> tell application "iTunes"
> set theParty to some playlist whose special kind is Party Shuffle
> repeat with thisFile in argv
> add thisFile to thePosition of theParty
> end repeat
> end tell
> end open
>
> Unfortunately it doesn't work... I'm pretty sure it did work before,
> but no more. I get the error message: "Item 1 {alias "filename.mp3"}
> doesn't understand the «event hookAdd» message." Soo, what does that
> mean? I have no idea, do you?
Is that really the *entire* script? I notice "thePosition" is
undefined, which will definitey cause problems.
If you don't care about the position in the play list, just change that
line to:
add thisFile to theParty
If you *do* care about the position, you'll need to set "thePosition" to
a relevant number inicating the position you want iTunes to insert the
tune in the play list.
--
Send responses to the relevant news group rather than to me, as
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR