OK, seems like it's a bad idea to target the index of the track when
you're already inside a 'tell track' block.. ;-)
Here is what works. It copies all artwork from the First track in the
selection, to the rest of the tracks:
tell application "iTunes"
set myP to view of front window
if selection exists then
set c to (item 1 of index of selection)
set theseTracks to index of selection
tell myP
if artworks of track c exists then
set theArtworks to artworks of track c
log ("Artworks: " & (count of theArtworks))
repeat with i from 1 to count of theseTracks
set thatTrack to (item i of theseTracks)
log thatTrack
log c
if thatTrack is not c then
say "Processing Track " & thatTrack
tell track thatTrack
repeat with j from 1 to count of theArtworks
set artworkData to (data of item j of theArtworks)
set data of artwork j to artworkData
end repeat
end tell
else
log "Skipping track"
end if
end repeat
display dialog "Done!" buttons {"Thanks"} default button 1 giving
up after 30
end if
end tell
end if
end tell
Best,
Jakob Peterhänsel
"Be a part of the Love Generation - carry a smile, not a gun."
- JP, May 2006
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/jakob%
40hjemme.dk