Re: iTunes Applescript Question
Re: iTunes Applescript Question
- Subject: Re: iTunes Applescript Question
- From: Andrew Oliver <email@hidden>
- Date: Fri, 01 Aug 2003 14:54:25 -0700
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.