Skip to content

Instantly share code, notes, and snippets.

@brandonpittman
Last active August 29, 2015 14:14
Show Gist options
  • Save brandonpittman/105c56d14f46efbb9aff to your computer and use it in GitHub Desktop.
Save brandonpittman/105c56d14f46efbb9aff to your computer and use it in GitHub Desktop.
Duplicate and Activate Weekly Review
tell application "OmniFocus"
tell default document
set p to first flattened project whose name is "Weekly Review"
set theDate to do shell script "date +'%F'"
set p2 to duplicate p to after p
set name of p2 to name of p2 & " " & theDate
set status of p2 to active
if visible of front document window is true then
set perspective name of document window 1 to "Weekly"
else
make new document window with properties {perspective name:"Weekly"} at end of document windows
activate
end if
end tell
end tell
@dbyler
Copy link

dbyler commented May 12, 2015

This is a beautiful thing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment