• 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: Michelle Steiner <email@hidden>
  • Date: Sat, 10 Feb 2007 10:38:37 -0700

On Feb 10, 2007, at 3:26 AM, Emmanuel wrote:

This thread seems a bit surrealistic if you once used XMLLib.osax to handle plists. Just out of curiosity, Michelle, kai, Luther, did you try to use XMLLib? Were you disappointed somehow?

It's Power PC only, right? I have an Intel Mac.

Anyway, I was going about it all wrong. Someone had asked on a list what music we listen to while running, so I exported my running playlist. When I opened it, I saw that it was an XML file (although I subsequently discovered that it's actually a plist format), so I wanted to extract song titles and performers from the list.

After all the help I got here, I then remembered that iTunes is scriptable. It took me about five to fifteen minutes to write a script that got the information directly from iTunes.

set theList to ""
tell application "iTunes"
set {trackName, trackArtist} to {name, artist} of tracks of playlist "running"
repeat with i from 1 to count of trackName
set theList to theList & item i of trackName & tab & item i of trackArtist & return
end repeat
end tell
set the FileName to choose file name
set fileref to (open for access the FileName with write permission)
write theList to fileref
close access fileref


-- Michelle

--
Discordians don't pray: it is far too dangerous.

_______________________________________________
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: "Steven D. Majewski" <email@hidden>
    • Re: Getting started with XML?
      • From: Emmanuel <email@hidden>
References: 
 >Re: Getting started with XML? (From: Michelle Steiner <email@hidden>)
 >Re: Getting started with XML? (From: Luther Fuller <email@hidden>)
 >Re: Getting started with XML? (From: kai <email@hidden>)
 >Re: Getting started with XML? (From: Emmanuel <email@hidden>)

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