Re: Getting started with XML?
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