Skip to content

Commit 2b06ecb

Browse files
committed
My Applescript template I use for quick tips posts when inside Omnifocus
1 parent a818104 commit 2b06ecb

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

of_quick_tip_template.applescript

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Script Name : of_quick_tip_template
2+
# Author : Craig Richards
3+
# Created : 9th December 2012
4+
# Last Modified : 11th December 2012
5+
# Version : 1.1
6+
7+
# Modifications : 1.1 - CR - Added a feature to get the current user, and also create the folder in the dropbox folder to store the photos for the blog post
8+
9+
# Description : This will create a new project titled with the name of the quick tip so I have all of the actions I need to do
10+
11+
-- Display a prompt to get the script title, this will also be the project name
12+
13+
display dialog "Name of the Quick Tip" default answer ""
14+
set postName to (text returned of result)
15+
16+
tell application "System Events"
17+
set currentUser to (name of current user)
18+
end tell
19+
20+
-- Load OmniFocus and create the project
21+
22+
tell application "OmniFocus"
23+
tell default document
24+
-- Set the primary context for the project
25+
26+
set pContext to first flattened context where its name = "Quick Tip"
27+
28+
-- Set the individual task context
29+
30+
set tContext to first flattened context where its name = "Computer"
31+
32+
-- Set the folder to store the project
33+
34+
set myFolder to first flattened folder where its name = "Quick Tips"
35+
36+
-- Set the date to start the project to today's date
37+
38+
set dateToday to (current date)
39+
40+
-- Create the project in the given folder
41+
42+
set MyProject1 to make new project with properties {name:postName, context:pContext} at end of project of myFolder
43+
tell MyProject1
44+
45+
-- Create the tasks
46+
47+
set MyAction to make new task with properties {name:"Folder Created in dropbox to store pictures", context:pContext, start date:dateToday}
48+
set MyAction to make new task with properties {name:"Pictures downloaded and stored in folder", context:tContext, start date:dateToday}
49+
set MyAction to make new task with properties {name:"Draft Started", context:tContext, start date:dateToday}
50+
set MyAction to make new task with properties {name:"Post Finished", context:tContext, start date:dateToday}
51+
set MyAction to make new task with properties {name:"Review and spell check", context:tContext, start date:dateToday}
52+
set MyAction to make new task with properties {name:"Final Read through", context:tContext, start date:dateToday}
53+
set MyAction to make new task with properties {name:"usual final paragraph added", context:tContext, start date:dateToday}
54+
set MyAction to make new task with properties {name:"Also like blog code", context:tContext, start date:dateToday}
55+
set MyAction to make new task with properties {name:"tags assigned", context:tContext, start date:dateToday}
56+
set MyAction to make new task with properties {name:"post scheduled", context:tContext, start date:dateToday}
57+
set MyAction to make new task with properties {name:"Tinyurl created", context:tContext, start date:dateToday}
58+
set MyAction to make new task with properties {name:"Bento Updated", context:tContext, start date:dateToday}
59+
set MyAction to make new task with properties {name:"Tweets about post", context:tContext, start date:dateToday}
60+
set MyAction to make new task with properties {name:"G+ about post", context:tContext, start date:dateToday}
61+
set MyAction to make new task with properties {name:"Clean Up dropbox folder", context:tContext, start date:dateToday}
62+
end tell
63+
end tell
64+
end tell
65+
66+
tell application "Finder"
67+
set mainFolder to "Macintosh HD:Users:craigdba:Dropbox:Geek Computers:Posts:quick tips" as alias
68+
make new folder at folder mainFolder with properties {name:postName, location:mainFolder}
69+
end tell

0 commit comments

Comments
 (0)