Created
October 14, 2015 08:01
-
-
Save simplicitybliss/ee9461fe4e800913d4b8 to your computer and use it in GitHub Desktop.
Completed → Waiting in Things
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
property waitingForTag : "Waiting" | |
property daysDue : 2 | |
tell application "Things" | |
repeat with selectedToDo in selected to dos | |
set projectToDo to project of selectedToDo | |
set areaToDo to area of selectedToDo | |
set status of selectedToDo to completed | |
set theTitle to "Waiting for " & name of selectedToDo | |
set theDueDate to (current date) + daysDue * days | |
set newToDo to make new to do ¬ | |
with properties {name:theTitle, due date:theDueDate} | |
set tag names of newToDo to waitingForTag | |
if projectToDo is not missing value then | |
set project of newToDo to projectToDo | |
else if areaToDo is not missing value then | |
set area of newToDo to areaToDo | |
move newToDo to list "Next" | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some documentation please see my accompanying blog post.