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


Click here to return to the 'A shell script to mute volume for a set length of time' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell script to mute volume for a set length of time
Authored by: rwmitchell on Jul 07, '05 12:50:12PM

Everyone's a critic...

You can make the script a little shorter by changing the order of the statements:


#!/bin/csh
osascript -e 'tell application "System Events" to set volume with output muted'
if ( $# != "0" ) then
sleep $1
osascript -e 'tell application "System Events" to set volume without output muted'
endif


That gets rid of one duplicate line.



[ Reply to This | # ]
A shell script to mute volume for a set length of time
Authored by: EvenStranger on Jul 11, '05 12:12:29PM

Used in reverse, this would be a good script to keep in mind for next April Fool's Day, perhaps combined with a particularly embarassing sound file. Jack up the volume, play sound, revert volume.

Ok, it's juvenile, but what's April 1 for if not to be a little juvenile?

EvenStranger (thirty something, going on twelve)



[ Reply to This | # ]