“Require Password After Screen Saver Begins” to “Immediately” or “Never”?

Hi There,
I wonder if there’s a script to set the value of minutes of “Require password after screen saver begins” to “Immediately” or “never”?
And
if there’s a script to set Screen Saver to “Classic” or to “Ventura”?

Thanks

Thank you.

I’m still using macOS Mojave, so I can’t guarantee this is the correct syntax for Ventura.

tell application "System Events"
   tell security preferences
      log out when inactive interval
   end tell
end tell

image

Actually I found out what would be more help to me is a way to set “Require password after screen saver begins”
and if there’s a way to set Screen Saver to “Classic” or to “Ventura”?

Sorry now this question becomes 3 questions >_<

Knowing Apple I’m doubtful, but I don’t have Ventura to test with and therefore cannot say.

Wondering what app is in that screen shot? it contains “require password to unlock”

It continues to work under Ventura. You must restart the setting app.

1 Like

Thanks, maybe this is correct.

However, I changed my question to :
Script for :
“Require password after screen saver begins” value
and
if there’s a way to set Screen Saver to “Classic” or to “Ventura”?

Script Debugger

Run – don't walk – and download it now...

Apple’s anemic Script Editor.app is old and has received very little love from them for many years, so…

When writing and testing AppleScript on macOS I advise folks to use Script Debugger – even if they don’t write much AppleScript.

The commercial version is not inexpensive at $99.99, BUT it reverts to its FREE “Lite” version after a 30 day demo period – and the free version still beats the utter pants off of Apple’s Script Editor.app.

I’ve used Script Debugger for 27 years plus and cannot begin to express how much it changed the AppleScript experience for me.