Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Scripts to disable and enable password for lock screen after sleep or screen saver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Scripts to disable and enable password for lock screen after sleep or screen saver
Authored by: Lri on Dec 07, '12 08:14:42AM

checkbox 2 is "Disable automatic login" on my account (or 10.8). You don't have to activate System Preferences either.

tell application "System Preferences"
	reveal anchor "General" of pane "com.apple.preference.security"
end tell
tell application "System Events" to tell process "System Preferences"
	tell (checkbox 1 of tab group of window 1 where description starts with "Require password")
		click
		if value is {1} then
			set message to "Password enabled"
		else
			set message to "Password disabled"
		end if
		do shell script "terminal-notifier -message '' -title " & quoted form of message
	end tell
end tell
quit application "System Preferences"


[ Reply to This | # ]
Scripts to disable and enable password for lock screen after sleep or screen saver
Authored by: Lri on Dec 14, '12 04:59:54AM

I forgot that the setting can be changed directly: tell application "System Events" to tell security preferences to set require password to wake to not require password to wake



[ Reply to This | # ]