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


Click here to return to the 'Controlling iTunes from the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Controlling iTunes from the Terminal
Authored by: teahaile on Aug 30, '06 06:26:08AM
the following makes more sense to me, logically:
            "vol"    ) echo "Changing iTunes volume level."
;
            if [ $($2) ]; then
                vol=`osascript -e 'tell application "iTunes
" to sound volume as integer'`;
                if [ $2 = "up" ]; then
                    newvol=$(( vol+10 ));

                elif [ $2 = "down" ]; then
                    newvol=$(( vol-10 ));

                elif [ $2 -gt 0 ]; then
                    newvol=$2;
                fi

                osascript -e "tell application "iTunes" t
o set sound volume to $newvol";
            fi


[ Reply to This | # ]