This is a rough first hack of a AppleScript to create a project to read a book: Ideally, Omni would add the ability to insert a variable into the task name and the repeating task would increment by an increment value. But, until that day (that may never come) this will have to do. The downside is that it creates all the tasks.
on appIsRunning(GTDAppName)
tell application "System Events"
return (count of (application processes whose name is GTDAppName)) is not 0
end tell
end appIsRunning
repeat
display dialog “Enter Name of Book” default answer "Test "
try
if the text returned of result is not “” then
set the _bookname to the text returned of the result
exit repeat
end if
on error
beep
end try
end repeat
repeat
display dialog “Beginning Chapter” default answer “1”
try
if the text returned of result is not “” then
set the _begin to the text returned of the result as number
exit repeat
end if
on error
beep
end try
end repeat
repeat
display dialog "Ending Chapter" default answer "2"
try
if the text returned of result is not "" then
set the _end to the text returned of the result as number
exit repeat
end if
on error
beep
end try
end repeat
display dialog ("Create Reading List Actions for " & _bookname & " from Chapters " & _begin & " to " & _end) ¬
buttons {“Create Actions”, “Cancel”} default button 1
if button returned of the result is “Create Actions” then
if appIsRunning("OmniFocus") then
tell application "OmniFocus"
tell default document
set personalFolder to folder named "Personal"
tell personalFolder
set booksFolder to folder named "Books"
tell booksFolder
set _ri to {unit:(day), steps:(2), fixed:(false)}
set _projectName to "Read " & _bookname
make project with properties {name:(_projectName), status:(active), sequential:(true), review interval:(_ri), note:("Chapters " & _begin & " to " & _end)}
set theProject to project named _projectName
tell theProject
repeat with chapter from _begin to _end
make task with properties {name:("Read Chapter " & chapter)}
end repeat
end tell
end tell
end tell
end tell
end tell
-- if OmniFocus is not running, launch it first and then create the Quick Entry
else
tell application "OmniFocus"
activate
tell default document
set personalFolder to folder named "Personal"
tell personalFolder
set booksFolder to folder named "Books"
tell booksFolder
set _ri to {unit:(day), steps:(2), fixed:(false)}
set _projectName to "Read " & _bookname
make project with properties {name:(_projectName), status:(active), sequential:(true), review interval:(_ri), note:("Chapters " & _begin & " to " & _end)}
set theProject to project named _projectName
tell theProject
repeat with chapter from _begin to _end
make task with properties {name:("Read Chapter " & chapter)}
end repeat
end tell
end tell
end tell
end tell
end tell
end if
end if