Skip to content

Commit a818104

Browse files
committed
My Applescript template I use for purchased ebooks when inside Omnifocus
1 parent 8f7c9b2 commit a818104

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

of_ebook_template.applescript

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Script Name : of_ebook_template
2+
# Author : Craig Richards
3+
# Created : 5th December 2012
4+
# Last Modified :
5+
# Version : 1.0
6+
7+
# Modifications :
8+
9+
# Description : This will create a new project titled with the name of the ebook and have all of the actions, so I can record the detail when I purchase a new book
10+
11+
-- Display a prompt to get the book title, this will also be the project name
12+
13+
display dialog "Name of the ebook" default answer ""
14+
set ebookName to (text returned of result)
15+
16+
-- Load OmniFocus and create the project
17+
18+
tell application "OmniFocus"
19+
tell default document
20+
-- Set the primary context for the project
21+
22+
set pContext to first flattened context where its name = "Computer"
23+
24+
-- Set the individual task context
25+
26+
set tContext to first flattened context where its name = "iMac"
27+
28+
-- Set the folder to store the project
29+
30+
set myFolder to first flattened folder where its name = "Personal"
31+
32+
-- Set the date to start the project to today's date
33+
34+
set dateToday to (current date)
35+
36+
-- Create the project in the given folder
37+
38+
set MyProject1 to make new project with properties {name:ebookName, context:pContext} at end of project of myFolder
39+
tell MyProject1
40+
41+
-- Create the tasks
42+
43+
set MyAction to make new task with properties {name:"Sync With Dropbox", context:pContext, start date:dateToday}
44+
set MyAction to make new task with properties {name:"Copied epub in iTunes", context:tContext, start date:dateToday}
45+
set MyAction to make new task with properties {name:"Copied pdf in iTunes", context:tContext, start date:dateToday}
46+
set MyAction to make new task with properties {name:"Synced to iPad", context:tContext, start date:dateToday}
47+
set MyAction to make new task with properties {name:"Copied mobi to Kindle Contect", context:tContext, start date:dateToday}
48+
set MyAction to make new task with properties {name:"Updated mysql_setup.sql", context:pContext, start date:dateToday}
49+
set MyAction to make new task with properties {name:"Inserted the record into the database", context:tContext, start date:dateToday}
50+
end tell
51+
end tell
52+
end tell

0 commit comments

Comments
 (0)