Re: iTunes Applescript Question
Re: iTunes Applescript Question
- Subject: Re: iTunes Applescript Question
- From: Andrew Oliver <email@hidden>
- Date: Fri, 01 Aug 2003 15:18:47 -0700
Interesting, I can't play any track off my iPod, even using the same format
as you use:
tell application "iTunes"
get track 1 of playlist 2 of source "myPod"
--> file track id 3047 of library playlist id 2899 of source id 2440 of
application "iTunes"
play track 1 of playlist 2 of source "myPod"
--> Parameter error
end tell
Beyond me.
Andrew
:)
On 8/1/03 3:05 PM, "email@hidden" <email@hidden> wrote:
>
I'm not very good with applescript so thanks for your help. It is
>
interesting because I can play tracks off the iPod if I do something
>
like :
>
>
play track X of playlist X of source "iPod Name"
>
>
So I wonder why I can't play tracks off the iPod using the database IDs?
>
>
On Friday, August 1, 2003, at 05:54 PM, Andrew Oliver wrote:
>
>
> First, your hierarchy is wrong. Tracks are elements of playlists, so
>
> you
>
> need to use the hierarchy:
>
>
>
> (tracks of playlist 1 of source "iPod name) whose database ID is 1443
>
>
>
> However, additionally you can't (or, at least, I can't seem to) play
>
> tracks
>
> off the iPod, only off local playlists. Therefore you need to a)
>
> identify
>
> the track you want to play, b) find that track in your library, and c)
>
> play
>
> it from the library.
>
>
>
> This seems to work for me, provided you have unique track names:
>
>
>
> tell application "iTunes"
>
> set theTrack to ((first track of playlist 1 of source "iPod name")
>
> whose
>
> database ID is 1234)
>
> tell playlist 1
>
> play track named (name of theTrack))
>
> end tell
>
> end tell
>
>
>
> In other words, I get the track that has the appropriate database ID,
>
> then
>
> play the track with the same name from my regular playlist/library.
>
>
>
> Andrew
>
> :)
>
>
>
>
>
> On 8/1/03 11:21 AM, "email@hidden" <email@hidden> wrote:
>
>
>
>> Hello,
>
>>
>
>> Does anyone know an applescript to tell iTunes to play a track on an
>
>> iPod using the database ID? I think it should be something like this:
>
>>
>
>> tell application "iTunes"
>
>> play (track whose database ID is 1443) of playlist 1 of source "iPod
>
>> Name Goes Here"
>
>> end tell
>
>>
>
>> This doesn't compile, it gives an error about not being able to make
>
>> some data into the right type or something. I know the database ID of
>
>> the song is correct. Any one know a solution?
>
>>
>
>> -Alex P.
>
>> _______________________________________________
>
>> applescript-users mailing list | email@hidden
>
>> Help/Unsubscribe/Archives:
>
>> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
>> Do not post admin requests to the list. They will be ignored.
>
> _______________________________________________
>
> applescript-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.