Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. set SysLaunched to ""
  2. if application "System Preferences" is running then
  3. set SysLaunched to true
  4. tell application "System Preferences"
  5. set CurrPane to 0
  6. try
  7. set CurrPane to get id of current pane
  8. end try
  9. quit
  10. end tell
  11. end if
  12. tell application "System Events"
  13. tell security preferences
  14. if get require password to wake is true then
  15. set require password to wake to false
  16. set response to "De-activated"
  17. else
  18. set require password to wake to true
  19. set response to "Activated"
  20. end if
  21. end tell
  22. tell application "GrowlHelperApp"
  23. set the allNotificationsList to {"Screensaver Setting"}
  24. set the enabledNotificationsList to {"Screensaver Setting"}
  25. register as application "AppleScript - SSPass" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "System Preferences"
  26. notify with name "Screensaver Setting" title "Screensaver Setting" description "Passwords have been " & response & "!" application name "AppleScript – SSPass"
  27. end tell
  28. end tell
  29. if SysLaunched is true then
  30. tell application "System Preferences"
  31. activate
  32. if CurrPane is not equal to 0 then
  33. set current pane to pane id CurrPane
  34. end if
  35. end tell
  36. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement