Skip to content

Commit b7d75fe

Browse files
committed
My Applescript template I use for scripts when inside Omnifocus
1 parent 22c40d8 commit b7d75fe

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

Diff for: of_scripts_template.applescript

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Script Name : of_scripts_template
2+
# Author : Craig Richards
3+
# Created : 5th December 2012
4+
# Last Modified : 11th June 2013
5+
# Version : 1.2
6+
7+
# Modifications : 1.1 - 21/05/13 - CR Added a line so we add a task to include line to sqlite setup as well
8+
# : 1.2 - 11/06/2013 - CR - Added a new line to check the headers are correct in the script
9+
10+
# Description : This will create a new project titled with the name of the script and have all of the actions so I can record/track/document my scripts
11+
12+
-- Display a prompt to get the script title, this will also be the project name
13+
14+
display dialog "Name of the script" default answer ""
15+
set scriptName to (text returned of result)
16+
17+
-- Load OmniFocus and create the project
18+
19+
tell application "OmniFocus"
20+
tell default document
21+
-- Set the primary context for the project
22+
23+
set pContext to first flattened context where its name = "Development"
24+
25+
-- Set the individual task context
26+
27+
set tContext to first flattened context where its name = "Computer"
28+
29+
-- Set the folder to store the project
30+
31+
set myFolder to first flattened folder where its name = "Personal"
32+
33+
-- Set the date to start the project to today's date
34+
35+
set dateToday to (current date)
36+
37+
-- Create the project in the given folder
38+
39+
set MyProject1 to make new project with properties {name:scriptName, context:pContext} at end of project of myFolder
40+
tell MyProject1
41+
42+
-- Create the tasks
43+
44+
set MyAction to make new task with properties {name:"Script tested", context:pContext, start date:dateToday}
45+
set MyAction to make new task with properties {name:"Fully commented", context:pContext, start date:dateToday}
46+
set MyAction to make new task with properties {name:"Headers added", context:pContext, start date:dateToday}
47+
set MyAction to make new task with properties {name:"Copied to right directory in the scripts directory", context:tContext, start date:dateToday}
48+
set MyAction to make new task with properties {name:"Copied to the github directory", context:tContext, start date:dateToday}
49+
set MyAction to make new task with properties {name:"Script copied into evernote", context:tContext, start date:dateToday}
50+
set MyAction to make new task with properties {name:"Note location copied to main page in Scripts note in evernote", context:tContext, start date:dateToday}
51+
set MyAction to make new task with properties {name:"Edited the mysql_setup.sql to include the new script", context:tContext, start date:dateToday}
52+
set MyAction to make new task with properties {name:"Edited the sqlite_setup.sql to include the new script", context:tContext, start date:dateToday}
53+
set MyAction to make new task with properties {name:"Inserted the record into the databases", context:tContext, start date:dateToday}
54+
end tell
55+
end tell
56+
end tell

0 commit comments

Comments
 (0)