• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iTunes7: How to copy multiple artworks to other tracks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: iTunes7: How to copy multiple artworks to other tracks?
  • From: Jakob Peterhänsel <email@hidden>
  • Date: Fri, 29 Sep 2006 21:30:35 +0200

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

  • Prev by Date: can't create a read only object
  • Next by Date: [Q] Problem in loading an image
  • Previous by thread: Re: iTunes7: How to copy multiple artworks to other tracks?
  • Next by thread: Mail.app hangs when password to AOL account is not accepted
  • Index(es):
    • Date
    • Thread