Created
April 16, 2014 19:19
Revisions
-
hiilppp created this gist
Apr 16, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ do shell script "defaults write com.apple.screensaver askForPassword 1; defaults write com.apple.screensaver askForPasswordDelay 0" repeat until (do shell script "defaults read com.apple.screensaver askForPassword") = "1" and (do shell script "defaults read com.apple.screensaver askForPasswordDelay") = "0" delay 0.5 end repeat tell application "ScreenSaverEngine" to activate if application "iTunes" is running then tell application "iTunes" if player state is playing then set initial_sound_volume to the sound volume set i to initial_sound_volume repeat until i = 0 set i to i - 1 set sound volume to i delay 0.1 end repeat pause set sound volume to initial_sound_volume end if end tell end if if application "OmniFocus" is running then tell first document of application "OmniFocus" synchronize (* repeat until syncing is false delay 0.1 end repeat do shell script "date \"+%-d.%-m.%Y, %-H:%M:%S\" > \"$HOME/Dropbox/var/lib/of/ls.txt\"" *) end tell end if