Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. -- Disable the screen Saver Password
  2.  
  3. do shell script "defaults -currentHost write com.apple.screensaver askForPassword -int 0"
  4.  
  5. do shell script "notif"
  6.  
  7.  
  8. -- Turn OFF the screen saver
  9.  
  10. tell application "ScreenSaverEngine" to quit
  11.  
  12. tell application "Address Book"
  13. if not unsaved then
  14. try
  15. quit
  16. delay 1
  17. end try
  18. end if
  19. end tell
  20.  
  21.  
  22. -- Reconnect to the Address Book
  23.  
  24. do shell script "defaults write com.apple.AddressBook ABCheckForPhoneNextTime -boolean true"
  25.  
  26. try
  27. tell application "Address Book"
  28. launch
  29. end tell
  30.  
  31.  
  32. tell application "System Events"
  33. set the visible of process "Address Book" to no
  34. end tell
  35.  
  36. end try
  37.  
  38.  
  39. -- Synchronize the Device
  40.  
  41. tell application "iSync"
  42. if last sync is less than ((current date) - 900) then
  43. synchronize
  44. end if
  45. end tell
  46.  
  47. tell application "System Events" to set visible of process "iSync" to false
  48.  
  49.  
  50. Leaving Proximity.scpt
  51.  
  52.  
  53. -- Turn on the screen saver password
  54.  
  55. do shell script "defaults -currentHost write com.apple.screensaver askForPassword -int 1"
  56.  
  57. do shell script "notif"
  58.  
  59.  
  60. -- Activate the screen saver
  61.  
  62. tell application "ScreenSaverEngine" to activate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement