• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iTunes Applescript Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes Applescript Question


  • Subject: Re: iTunes Applescript Question
  • From: email@hidden
  • Date: Fri, 1 Aug 2003 18:29:56 -0400

What if you try this exactly as I have it here:

tell application "iTunes"
play track 1 of the playlist 1 of source "Your Pod Here"
end tell

It didnt work for me either when I had anything before the play
command, so maybe it will work if you only put the play command.

On Friday, August 1, 2003, at 06:18 PM, Andrew Oliver wrote:

> 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.

References: 
 >Re: iTunes Applescript Question (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: iTunes Applescript Question
  • Next by Date: Quicksort Implementation v1.0.2
  • Previous by thread: Re: iTunes Applescript Question
  • Next by thread: HTML mail
  • Index(es):
    • Date
    • Thread