iTunes cover art iChat icon

I whipped up an AppleScript for iChatStatus to set your iChat icon to the album art for the currently playing song. It’s an amalgam of the default iTunes script for iChatStatus and a script that sets the iChat icon. I haven’t tested it too throughly, but it seems to be working for me.

In addition to iChatStatus, you’ll need GraphicsImporter OSAX installed, since that’s what the iChat icon script I assimilated used. Download iCS Album Art.scpt or copy and paste the code in this entry into Script Editor.

If you need help getting album art for your music, I’ve had a lot of success with Find Album Artwork With Google.


tell application "System Events"
if ((application processes whose (name is equal to "iTunes")) count) is greater than 0 then
tell application "iTunes"
if player state is playing then
set the_artist to artist of current track
set the_song to name of current track
set theAlbum to album of current track
set theData to (data of artwork 1 of current track)
set theTiff to giconvert theData type "TIFF" resolution {32, 32}
tell application "iChat"
set image to theTiff
end tell
if the_artist is not missing value then
return the_artist & " - " & the_song
else
return the_song
end if
else if player state is paused then
return "Paused"
else if player state is stopped then
return "Quiet"
end if
end tell
else
return "Off"
end if
end tell

2 thoughts on “iTunes cover art iChat icon

  1. Sweet!
    Try that on any other OS. Linux people would tell you to go write some code. Applications need to support scripting in a high level language for this sort of stuff to happen… but AppleScript users have understood this for years. And if you think dropping to C/C++ on Linux to connect up applications, try it with COM on Windows.
    -Harold

  2. Nice work! Fun to see that people are still playing with iChatStatus. I happened on this link thanks to a new iChatStatus user who contacted me over iChat.
    / Rgds, David (author of iChatStatus)

Leave a Reply