Skip to content

Instantly share code, notes, and snippets.

@puttiz
Created September 9, 2010 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save puttiz/571938 to your computer and use it in GitHub Desktop.
Save puttiz/571938 to your computer and use it in GitHub Desktop.
Things integrate with Pomodoro
-- End : Marking to-dos completed
tell application "Things"
tell list "Today"
set toDoToComplete to to do named "$pomodoroName"
set status of toDoToComplete to completed
set tag names of toDoToComplete to "⌘,✔"
end tell
move toDoToComplete to list "Next"
end tell
activate application "ScreenSaverEngine"
-- Interrupt over : Making to-dos canceled
tell application "Things"
tell list "Today"
set toDoToCancel to to do named "$pomodoroName"
set status of toDoToCancel to canceled
set tag names of toDoToCancel to "⌘,✘"
end tell
end tell
-- Start : work fine
tell application "Things"
try
tell list "Today"
try
set editToDo to to do named "$pomodoroName"
on error
set editToDo to to do named "One Session"
set name of editToDo to "$pomodoroName"
end try
end tell
on error
set newToDo to make new to do ¬
with properties {name:"$pomodoroName",due date:current date} ¬
at beginning of list "Today"
set tag names of newToDo to "⌘"
end try
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment