I just upgraded to 10.12 and a script is no longer working. Guessing it has to do with the more buttoned down password usage in Sierra. I have a little compiled script to turn password on/off when screen saver turns on (via timeout or hot-corner). I use Alfred to quickly turn this feature on and off.
Now I’m a javascript coder and not a applescript one. I found and hacked the following to work pre-Sierra.
Any assistance to get this working again would be great. Current searching seems that this works in the terminal, but not unless you reboot which doesn’t fit my workflow:
defaults write 'com.apple.screensaver' 'askForPassword' -int 1
Thanks.
tell application "System Events" to set require password to wake of security preferences to true
and my other one is to turn off:
tell application "System Events" to set require password to wake of security preferences to false