iTunes: getting all tracks of the same album

Hi There!

I just wanted to ask you, how I could get a list of all tracks of one album… I specify the album title and the applescript should return all the songs that are in iTunes with the same album tag… could you help me?

Thanks alot,

oddy

Try something like this:

tell application "iTunes"
	activate
	display dialog "Album:" default answer ""
	
	get tracks of library playlist 1 whose album is (get text returned of result)
end tell

thank you very, very much!

well, maybe you can help me again!

I want to loop through each item and set the artwork… can you tell me how?

Thank you sincerely,

oddy

here’s the solution, given currentArtwork is a pict file:

tell application "iTunes"
	repeat with mySong in ((tracks of library playlist 1) whose album is "Living in the material World")
		set data of artwork 1 of mySong to currentArtwork
	end repeat
end tell

this script gets all tracks that are from the album “Living in The Material World” and sets their covers to currentArtwork!

kind regards,

oddy