• 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
iTunes - referring to a track in the library via its database ID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iTunes - referring to a track in the library via its database ID


  • Subject: iTunes - referring to a track in the library via its database ID
  • From: Brennan <email@hidden>
  • Date: Thu, 7 Dec 2006 12:28:18 +0100

Hi there,

Just wanted to do something quite simple, or so I thought... I'm not one
to shrink from growing applescripts, I've been scripting for years, I can
dream up OOP models in the bath while scrubbing my.. willyou mind if we
get back to what I want to do?

Select some tracks in an iTunes user playlist (i.e. NOT the library
playlist). Run the script. The script should delete the selected tracks
from the library playlist.

I was hoping to use 'database ID'. I can get the 'database ID' of the
selected tracks in the frontmost playlist. The dictionary promises me that
this is how we can uniquely identify a library track. Goodie.

The problem is, how do I refer to a track in the library if all I've got
is the database ID?

The following bare bones snippets fail to compile with 'expected end of
line but found property or key form'

tell application "iTunes"
	tell library playlist
		track ID 1234
	end tell
end tell

tell application "iTunes"
	tell library playlist
		tracks whose database ID is 1234
	end tell
end tell

So... what is the correct incantation? Isn't this a very basic thing?

Brennan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Durations of mp3 files?
  • Next by Date: Re: Quark Library query, help required please...
  • Previous by thread: Re: Durations of mp3 files?
  • Next by thread: Re: iTunes - referring to a track in the library via its database ID
  • Index(es):
    • Date
    • Thread