Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Show current iTunes song in X-Chat Aqua' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Show current iTunes song in X-Chat Aqua
Authored by: durin42 on Nov 08, '05 08:29:21AM
if you want a generic shell version of the above, use this quick hack:

#!/bin/sh

echo 'tell application "iTunes"
  "Now playing: " & artist of current track & " - " & name of current track
end tell' | osascript
Note the single quotes surrounding the Applescript segment. I'm sure there's a better way to make a command-line script to return this, but this works just fine.

[ Reply to This | # ]
Show current iTunes song in X-Chat Aqua
Authored by: anaxamander on Nov 08, '05 01:37:07PM
Get the filename of the currently playing song in iTunes:
basename "`osascript -e 'tell application "iTunes" to set thePath to location of current track' -e 'POSIX path of thePath'`"
Soul Mekanik - Robots.mp3
basename "`osascript -e 'tell application "iTunes" to set thePath to location of current track' -e 'POSIX path of thePath'`" | awk -F '.m[4p][a3]$' '{print $1}' 
Soul Mekanik - Robots

[ Reply to This | # ]
Show current iTunes song in X-Chat Aqua
Authored by: merosen on Nov 08, '05 04:49:11PM

is there a command suntax so the result isnt broadcaast to all users
but shows up only as local result ?



[ Reply to This | # ]
Show current iTunes song in X-Chat Aqua
Authored by: zottel on Nov 16, '05 01:20:18PM
To just show the song locally, use
exec
instead of
exec -o
when defining your xchat command.

[ Reply to This | # ]
Show current iTunes song in X-Chat Aqua
Authored by: timhaigh on Nov 08, '05 06:58:10PM

This script also works for me in the X11 version of xchat that I compiled using Fink.



[ Reply to This | # ]