Automating OmniFocus Tutorial Outline
Videos: Intro and Setup (7:04) • Settings and Console (21:00)
Here is the class outline:
Section A • Preparing for Automation
How to enable secure use of Omni Automation.
- What is Omni Automation? How does it work?
- Enabling secure use of external Omni Automation script URLs.
Section 1 • The Console
Each Omni application has a Console window in which you enter and run Omni Automation script statements and functions to query and control the host application.
- How to activate “Developer Mode” in order to gain access to the Automation Console, Automation API Reference, the Automation Menu, and the dialog for Configuring Plug-Ins Management Controls.
- How to access the API and use the provided information to access the values of the properties of the Application class.
- How to use code completion instances in the console toolbar.
Section 2 • Tasks in the Inbox
The Inbox contains your tasks ready to assigned, processed, and organized. How to create, reference, and manipulate tasks.
- The value of the inbox property of the Database class represents the contents of the OmniFocus Inbox, and returns an array of object references to the tasks that are currently in the Inbox.
- How to create new tasks using the new task constructor: new Task("Task Name") that takes a positional placement indicator as its optional second parameter: new Task("Task Name", container or position for the created task)
- object references and property records are used to represent objects and to display a list of their properties and corresponding values.
- Tasks can be identified by the value of their name property, and an object reference to specified Inbox task can be generated using the taskNamed("Title of Task to Find") function called on the inbox property.
- The tasks in the Inbox can be processed using the forEach(…) function called on the resulting array of task object references returned as the value of the inbox property.
Section 3 • Due and Repeat
In JavaScript and Omni Automation, date and time intervals are represented through the use of JavaScript date objects. This section of the OmniFocus tutorial will be focused on the use of date objects with tasks.
- How to generate JavaScript date objects using the new Date( ) constructor and the Omni Automation date formatters.
- How to assign a due date to a task by assigning a date object as the value for the task’s dueDate property.
- How to make a task a repeating task by creating a repetition rule object and assign it as the value for the task’s repetitionRule property.
- How to add a notification to the repeating task.
Section 4 • Tags
This section of the tutorial will examine how to create, find, assign, and delete tags — one of the most powerful features of OmniFocus.
- Using the perspective property of the Window class, you can change the perspective currently displayed in OmniFocus.
- How to create, reference, and assign tags to tasks.
Section 5 • Projects
In this section of the tutorial, you’ll learn how to create projects, set the value of their properties, and populate them with tasks.
- How to display the Projects Perspective.
- How to create a new instance of the Project class.
- How to move tasks into a project.
- How to add a task to a project.
- How to change the values of the properties of a project.
Section 6 • Plug-Ins
In this section you’ll learn how to create and install a plug-in that removes tags from all of the selected tasks selected in OmniFocus.
- What is a plug-in?
- How to create, install, and run an Omni Automation plug-in for OmniFocus.
- How to access the built-in plug-in management tools.
Section 7 • Cleanup and Restore
Returning your OmniFocus database back to where it was at the beginning of the tutorial.