Show current iTunes song in X-Chat Aqua

Nov 08, '05 05:13:00AM

Contributed by: zottel

Ever wanted to have X-Chat Aqua automatically print the song iTunes is playing at the moment? Here's how to do it. Fire up the Script Editor (in /Applications: AppleScript), and type in or copy and paste the following small script:


tell application "iTunes"
  "Now playing: " & artist of current track ¬
  & " - " & name of current track
end tell
Execute it to see if it shows what you want, and maybe edit it to your needs. Save it somwhere; in my case I called it iTunes_np.scpt, and saved it to my user's bin folder. Start XChat-Aqua and, in the menu, go to X-Chat Aqua: Preferences Lists > User Commands. Click the Add button and choose a name for the command to show the song -- NP (for "now playing"), for example. In the box to the right, enter exec -o osascript /path/to/script. In my case, this was exec -o osascript /Users/zottel/bin/iTunes_np.scpt.

Voila, you're done. From now on, whenever you type /np (or whatever you chose for the command name), your currently playing song will be posted to the current channel.

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051103152054519