Created
January 19, 2015 16:46
-
-
Save brock/254197c0a63558c1e945 to your computer and use it in GitHub Desktop.
AppleScripts to lock and unlock a macbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell security preferences | |
set require password to wake to true | |
end tell | |
end tell | |
activate application "ScreenSaverEngine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell security preferences | |
set require password to wake to false | |
end tell | |
end tell | |
tell application "ScreenSaverEngine" to quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment