hejdo : OS X Lion: Set screensaver lock period automatically, depending on network

blog :: en :: computers :: mac :: autograce

Wed, 15 Feb 2012

OS X Lion: Set screensaver lock period automatically, depending on network

Autograce is a simple AppleScript to change the grace period of your screensaver automatically, depending on the BSSID of your current WLAN. If you're at home, after the screen saver activates, you've got one hour before having to re-enter your password. If you're away, this time is reduced to five seconds.

For this to work, you will have to enable support for assistive devices in the Universal Access pane of your System Preferences. After download, edit the script to set the BSSID of your home WLAN. Save it as an "Application" and make sure to set the option "Stay Open" so that it will keep monitoring your connection. You can add the script to your startup items to have it open whenever you log in. The script uses the System Preferences application to make changes. To avoid interrupting your work too often, it will only check once in five minutes, and will only change things if necessary.

The script was tested on OS X Lion and will probably not work on other releases of OS X. Say Hi to Apple for working hard to ensure programmers stay in business. ;-)

posted at: 10:52 | path: /en/computers/mac | permalink

Home | Blog | Impressum