Populate array with iTunes data

I’ve been trying to write a script to populate an array with the name, artist, album and played count of all the tracks in iTunes. I then want to be able to write this to a CSV file for import into Numbers.

Can somebody please shed some light for me…


Export playlist… doesn’t cut it for you?