tell application "System Events" tell security preferences if get properties is {require password to wake:true, class:security preferences object, secure virtual memory:false, require password to unlock:false, automatic login:true, log out when inactive:false, log out when inactive interval:5} then set properties to {require password to wake:false, secure virtual memory:false, require password to unlock:false, automatic login:true, log out when inactive:false, log out when inactive interval:5} tell application "GrowlHelperApp" set the allNotificationsList to {"Screensaver Setting"} set the enabledNotificationsList to {"Screensaver Setting"} register as application "AppleScript - SSPass" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "System Preferences" notify with name "Screensaver Setting" title "Screensaver Setting" description "The Screensaver password has been disabled." application name "AppleScript - SSPass" end tell else set properties to {require password to wake:true, secure virtual memory:false, require password to unlock:false, automatic login:true, log out when inactive:false, log out when inactive interval:5} tell application "GrowlHelperApp" set the allNotificationsList to {"Screensaver Setting"} set the enabledNotificationsList to {"Screensaver Setting"} register as application "AppleScript - SSPass" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "System Preferences" notify with name "Screensaver Setting" title "Screensaver Setting" description "The Screensaver password has been enabled." application name "AppleScript - SSPass" end tell end if end tell end tell