Last active
August 29, 2015 14:14
-
-
Save brandonpittman/105c56d14f46efbb9aff to your computer and use it in GitHub Desktop.
Duplicate and Activate Weekly Review
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a beautiful thing. Thanks!