My Morning and Nightly AppleScripts
Posted February 13th, 2007 @ 11:06pm by Erik J. Barzeski
Two entries in my crontab look a little funny to some people:
0 7 * * * /Users/iacas/.script-morning.app 0 23 * * * /Users/iacas/.script-night.app
.script-night.app
tell application "System Events" if exists (process "ScreenSaverEngine") then tell application "System Events" to set volume with output muted end if end tell
.script-morning.app
tell application "System Events" to set volume without output muted
In other words, one script mutes my computer so that my email application doesn't make noise when I'm trying to sleep. Sometimes I work until 2am, and this setup allows me to do so. When I go to bed I simply try to remember to mute.
Posted 14 Feb 2007 at 12:15am #
Oh man. I so needed something like this! Thanks!