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:
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.
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.
•
[12,863 views]

