set SysLaunched to "" if application "System Preferences" is running then set SysLaunched to true tell application "System Preferences" set CurrPane to 0 try set CurrPane to get id of current pane end try quit end tell end if tell application "System Events" tell security preferences if get require password to wake is true then set require password to wake to false set response to "De-activated" else set require password to wake to true set response to "Activated" end if end tell 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 "Passwords have been " & response & "!" application name "AppleScript – SSPass" end tell end tell if SysLaunched is true then tell application "System Preferences" activate if CurrPane is not equal to 0 then set current pane to pane id CurrPane end if end tell end if