MacIrssi and iTunes script for Snow Leopard

Even though I should have gone to bed over an hour ago, I could not help but keep looking for a quick way to display my current iTunes track information in an IRC channel via MacIrssi. With all the updates for Snow Leopard, I kept seeing odd messages (and even odder coding).

A quick how to on AppleScript, combined with an adobe.com forum help page and I managed to create my FIRST AppleScript.

— small script to use for displaying iTunes track+artist+album wherever you open an applescript

— when iTunes is running

tell application “iTunes”

if player state is playing then

— get track, artist and album

set currenttrack to the name of current track

set currentartist to the artist of current track

set currentalbum to the album of current track

— show track, artist and album

set titleinfo to (currenttrack & ” – ” & currentartist & ” | ” & currentalbum)

set output to titleinfo

end if

end tell

[save as nameofscript.scpt or copy from : http://pastebin.ca/1581948]

Combine this with a simple command line for MacIrssi (or irssi, for the purists):

/exec -out arch -i386 osascript /Users/username/locationofscript/nameofscript.scpt

Good luck!

Posted via web from Leonieke @ posterous

Leave a Reply