• 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: iTunes 4 & Artwork scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes 4 & Artwork scripting


  • Subject: Re: iTunes 4 & Artwork scripting
  • From: "David A. Cox" <email@hidden>
  • Date: Thu, 8 May 2003 07:18:10 -0700 (PDT)

This was very helpful to me in starting to play with some things, but I am
still a bit stuck.

Basicaly, I want to pull the frontmost artwork from the current track in
itunes, and then fiddle with the file. I have it set up so that I can pull
the image out of itunes, and save it to a temp location on the disk, but
the file still seems "odd" in many ways. If I give the file a *.pict file
name, I can always open it in Safari, and it will often open in Preview
(but not always). If I try to manipulate the image with any of the command
line tool included in a package called imagemagic, it gives me an error to
the effect that a file name is missing (this seems to be from parsing the
image file itself). The file also reports in the finder as a text file, no
matter what extension I put on it.

Any thoughts would be of help, as I am rather stuck. The script that I am
using to save a copy of the image to a temp file is (but note that
Photoshop will not open the same file):

tell application "iTunes"
if artworks of current track exists then
set imgdata to front artwork of current track
set img to (data of imgdata) as picture

tell application "Finder"
set imgfile to "Macintosh HD:Users:dcox:base.pict" as text
open for access alias imgfile with write
permission
write (img as picture) to alias imgfile
close access alias imgfile

tell application "Safari"
open imgfile as alias
end tell

end tell
end if
end tell

DAC

On Thu, 1 May 2003, Doug Adams wrote:

> So far, we can grab the art and put it in the clipboard:
>
> tell application "iTunes"
> set myP to view of front window
> if selection exists then
> set c to (item 1 of index of selection)
> tell myP
> if artworks of track c exists then
> set pic to data of the artworks of track c as picture
> set the clipboard to pic
> return clipboard info
> end if
> end tell
> end if -- selection
> end tell
>
> A script that copied one track's artwork to all others in the playlist
> would be cool. All help appreciated.
> --
> Doug Adams
> email@hidden
>
> iTuners! Get Some AppleScripts!
> Doug's AppleScripts for iTunes
> <malcolmadams.com/itunes/>
> RSS feed:
> <malcolmadams.com/itunes/dougs.rss>
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: iTunes 4 & Artwork scripting (From: Doug Adams <email@hidden>)

  • Prev by Date: Re: Scriptable Text Editor for OSX???
  • Next by Date: Test - Please ignore
  • Previous by thread: Re: iTunes 4 & Artwork scripting
  • Next by thread: Re: iTunes 4 & Artwork scripting
  • Index(es):
    • Date
    • Thread