Subscribe to
Posts
Comments
NSLog(); Header Image

My Morning and Nightly AppleScripts

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.

One Response to "My Morning and Nightly AppleScripts"

  1. Oh man. I so needed something like this! Thanks!


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.