Created
October 26, 2010 02:29
-
-
Save HotFusionMan/646214 to your computer and use it in GitHub Desktop.
When lending your Mac to someone who doesn't have an account on it, turn off being bothered to type in your password for them every time they have to wake it from sleep.
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 Preferences" | |
activate | |
set current pane to pane id "com.apple.preference.security" | |
tell application "System Events" | |
tell process "System Preferences" | |
-- UNLOCK CHECKS | |
if (exists checkbox "Click the lock to make changes." of window 1) is true then | |
click checkbox "Click the lock to make changes." of window 1 | |
-- wait for security login or dismissal | |
repeat until (count of every window) is not 0 | |
delay 1 | |
end repeat | |
if (exists checkbox "Click the lock to make changes." of window 1) then | |
set perform_changes to false | |
else | |
set perform_changes to true | |
end if | |
else | |
set perform_changes to true | |
end if | |
if perform_changes is true then | |
-- MAKE CHANGES | |
click checkbox "Require password" of tab group 1 of window "Security" | |
end if | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment