Created
February 12, 2011 07:05
-
-
Save thisivan/823572 to your computer and use it in GitHub Desktop.
Concentrate (http://getconcentrating.com) Pomodoro AppleScripts
This file contains hidden or 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 characters
(* Setup this script to run when a "Pomodoro" activity has finished. It will start either "Pomodoro Break" or "Pomodoro Long Break" when finished *) | |
set activity1 to "Pomodoro Break" | |
set activity2 to "Pomodoro Long Break" | |
set button3 to "Stop Working" | |
set dialogText to "What do you want to do now?" | |
set dialogTitle to "Choose your next step..." | |
set giveUp to 360 | |
set button1 to activity1 | |
set button2 to activity2 | |
tell application "Concentrate" | |
set andNow to display dialog dialogText buttons {button1, button2, button3} default button 1 with title dialogTitle with icon 1 giving up after giveUp | |
set nowDo to button returned of andNow | |
if nowDo is equal to button1 then | |
tell activity activity1 | |
concentrate | |
end tell | |
else if nowDo is equal to button2 then | |
tell activity activity2 | |
concentrate | |
end tell | |
else | |
return | |
end if | |
end tell |
This file contains hidden or 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 characters
(* Setup this script to run when a "Pomodoro Break" or "Pomodoro Long Break" activity has finished. It will start either "Pomodoro" or "Pomodoro Long Break" when finished *) | |
set activity1 to "Pomodoro" | |
set activity2 to "Pomodoro Long Break" | |
set button3 to "Stop Working" | |
set dialogText to "Ready for another one?" | |
set dialogTitle to "Choose your next step..." | |
set giveUp to 360 | |
set button1 to activity1 | |
set button2 to activity2 | |
tell application "Concentrate" | |
set andNow to display dialog dialogText buttons {button1, button2, button3} default button 1 with title dialogTitle with icon 1 giving up after giveUp | |
set nowDo to button returned of andNow | |
if nowDo is equal to button1 then | |
tell activity activity1 | |
concentrate | |
end tell | |
else if nowDo is equal to button2 then | |
tell activity activity2 | |
concentrate | |
end tell | |
else | |
return | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment