-
-
Save csreed/0d96ba8b0be6fb12cf3c23de0c931d35 to your computer and use it in GitHub Desktop.
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 characters
(* | |
Creates a “Pay Rent” project in OmniFocus. | |
*) | |
set theMonth to (do shell script "date -v+1m +\"%B\"") | |
set projectName to "Pay " & theMonth & " Rent" | |
set weekBefore to date (do shell script "date -v+1m -v1d -v-1w +\"%B %d, %Y\"") | |
set weekBefore's hours to 6 | |
set dayBefore to date (do shell script "date -v+1m -v1d -v-1d +\"%B %d, %Y\"") | |
set dayBefore's hours to 17 | |
tell front document of application "OmniFocus" | |
set homeContext to first flattened context whose name is "Home" | |
set theProject to make new project with properties {name:projectName, start date:weekBefore, due date:dayBefore, context:homeContext, sequential:true} | |
tell theProject | |
make new task with properties {name:"Write out check"} | |
make new task with properties {name:"Drop off rent check"} | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment