Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes7: How to copy multiple artworks to other tracks?



Hi All,

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

Email:     email@hidden
AIM:         Marook
Phone:     +45 22684961


On 29/09/2006, at 0:40, Jakob Peterhänsel wrote:

Hi All,

I'm a bit confused, why I can't copy artwork data to other tracks, other than the 'front' or 'last' artwork.

I'm able to iterate through a given track, get the picture data, format etc, and do:

	set data of front artwork to artworkData
	set data of last artwork to artworkData

But if I try to add it in some way, it fails:

make new artwork at end of artworks with properties {data:artworkData}
-> iTunes got an error: Handler only handles single objects.

set data of artwork j of item i to artworkData
-> iTunes got an error: Unknown object type.


Why is iTunes not able to make/set more that 1 artwork, when the interface supports unlimited artwork?




    Jakob Peterhänsel

"Be a part of the Love Generation - carry a smile, not a gun."
- JP, May 2006

Email:     email@hidden
AIM:         Marook
Phone:     +45 22684961


_______________________________________________
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


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >iTunes7: How to copy multiple artworks to other tracks? (From: Jakob Peterhänsel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.