aMSN Forums

The Community => Plugins => Topic started by: nicolunacba on July 30, 2010, 10:15:43 pm



Title: New music for iTunes: please test Snow Leopard users
Post by: nicolunacba on July 30, 2010, 10:15:43 pm
Hi! I am back after a nice glaucoma (http://en.wikipedia.org/wiki/Glaucoma)... I am ok so... Here we go! :) I was reading comments about the music plugin for iTunes in OS X Snow Leopard. So, I writed this copying the Unix info files (for Linux and BSDs). Mac OS X is a BSD, so, using the wonderful Shell Script and Osascript, I writed another one.

Please, test it. It works for me. Go to /Applications/aMSN.app/Contents/Resources/Scripts/plugins/music/ and paste the files (maybe needs to set as executable the file "infoitunes", so open the terminal, go to the directory with files and do "chmod +x infoitunes).

The files is:
http://nicolunacba-projects.zzl.org/files_to_replace_in_music.zip (http://nicolunacba-projects.zzl.org/files_to_replace_in_music.zip)

Sourcecode (how it works):

#!/bin/bash
# by nicolunacba 2010

#Check if iTunes is Open
ACTIVE=`osascript -e 'tell application "System Events" to (name of processes) contains "iTunes"'`
if [[ $ACTIVE == "false" ]]; then
        echo 0
        exit 0
fi

#Get info ... UPDATE! Fixed typo
ARTIST=`osascript -e 'tell application "iTunes" to do shell script "echo " & "\"" & (artist of current track) & "\""'`
TITLE=`osascript -e 'tell application "iTunes" to do shell script "echo " & "\"" & (name of current track) & "\""'`

echo 1

#Print it as a normal Unix shellscript :-)
echo $ARTIST
echo $TITLE

exit 0


Try pressing play and stop (in the icon of aMSN) until text appears. Or be patient. It's an script :-P


Title: Re: New music for iTunes: please test Snow Leopard users
Post by: nicolunacba on August 02, 2010, 02:01:07 am
no one can test it?