• 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: Getting started with XML?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting started with XML?


  • Subject: Re: Getting started with XML?
  • From: kai <email@hidden>
  • Date: Wed, 7 Feb 2007 23:27:18 +0000


On 7 Feb 2007, at 22:07, Michelle Steiner wrote:

On Feb 7, 2007, at 11:44 AM, kai wrote:

Change the "Name" label for some other type of value (such as "Total Time", "Year", "Library Folder Count", "Bit Rate", "Play Count", "Track Type", "Disc Number", "Genre", "Disc Count", "Composer", "Track Count", "Artist", "Date Modified", "Track Number", "Persistent ID", "File Creator", "Location", "File Type", "Sample Rate", "File Folder Count", "Play Date", "Track ID", "Play Date UTC", "Date Added", "Album", "Kind" or "Size").

It doesn't work with Album, Composer, or Artist; trying with either of those results in the word "value" being selected with the error message:


"System Events got an error: NSReceiverEvaluationScriptError: 4"

This is because some of the tracks do not have that information, and when the information isn't there, neither is the property list item. Instead of saying "Artist: missing value" or something similar, the property list item "Artist" is not there for that track. Looks like the only way to get at the artist list is to loop through the entire property list. *sigh*

You should be able to filter such items, Michelle. Try this, for example:


----------------

tell application "System Events" to set composer_list to value of ¬
	property list item "Composer" of (property list items of ¬
	property list item "Tracks" where name of property list items ¬
	contains "Composer") of property list file (plistFile's path)

----------------

---
kai


_______________________________________________ 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
  • Follow-Ups:
    • Re: Getting started with XML?
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Getting started with XML? (From: Michelle Steiner <email@hidden>)
 >Re: Getting started with XML? (From: kai <email@hidden>)
 >Re: Getting started with XML? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: applescript saveas menu action
  • Next by Date: Re: applescript saveas menu action
  • Previous by thread: Re: Getting started with XML?
  • Next by thread: Re: Getting started with XML?
  • Index(es):
    • Date
    • Thread