• 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: database ID equivalent for playlists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes: database ID equivalent for playlists?


  • Subject: Re: iTunes: database ID equivalent for playlists?
  • From: Stephen Jonke <email@hidden>
  • Date: Fri, 15 Apr 2005 23:06:10 -0400


On Apr 15, 2005, at 6:06 AM, has wrote:

You couldn't just keep track of playlists by full reference? iTunes is very good in this respect: returned references use IDs throughout so are very stable. If you're creating new playlists, just store the returned references in variables and reuse them any time you need to refer to that particular playlist or any of its content.

I tried that, but it doesn't really work. It works for some things, but not for others. For example I find that when using the reference returned by the "make new playlist", any attempt to copy tracks to the playlist via that referece do not work - nothing is copied into the playlist! Example:


set thePlaylist to make new playlist with properties {name:"Test Playlist"}
copy every track of playlist 1 to thePlaylist


I'm just typing this off the top of my head - presume here that there is a playlist 1 and it is populated with many tracks. After these commands, nothing is in playlist "Test Playlist". However, this does work:

  make new playlist with properties {name:"Test Playlist"}
  copy every track of playlist 1 to playlist "Test Playlist"

???

tell application "iTunes" to set myPlaylist to playlist 1 of source "library"
set myID to id of myPlaylist


To select an element by id, just use the standard by-id reference form:

tell application "iTunes" to get playlist id myID of source "library"

Very interesting. I will give it a try. Thanks very much! AppleScript sure can be flakey....


Steve

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: iTunes: database ID equivalent for playlists? (From: has <email@hidden>)

  • Prev by Date: Re: An Applescript Cocktail
  • Next by Date: How to Renew DHCP Lease
  • Previous by thread: Re: iTunes: database ID equivalent for playlists?
  • Next by thread: Re: iTunes: database ID equivalent for playlists?
  • Index(es):
    • Date
    • Thread