Artist Export in iTunes

Hi, I’m new to Applescripting, and I’d like to make a script that somehow results in a text file of every artists in the iTunes database.

So far, what I have is this:

tell application "iTunes"
	set all_artists to artists
	repeat with this_artist in all_artists
		display dialog "hi" & this_artist
	end repeat
end tell

This does not work. What am I doing wrong? How should I do this?

ANY help would be appreciated; I am very aggrivated.
Thank you,

“artist” is a property of a “track”, which is part of a playlist. So:

tell application "iTunes"
	artist of tracks of playlist 1
end tell

Now, you can find in this forum various methods to clean a list of duplicates. Eg:
And is left to you as an exercice the read/writing part. Feel free to search this forum or take a look to our FAQ section, at

Good luck :wink: