Tag: omnifocus

Automating OmniFocus to scope every task

I can’t believe Omni-automation has been out for so long and I haven’t talked about it.

The tl;dr of the site is that Omni Group recently (as in six months ago) supercharged the automation capability of all their apps (OmniFocus, OmniGraffle, OmniOutliner, OmniPlan), by giving them a really robust Javascript Core framework. That sentence will either send you to sleep, or make you quite excited, and that reaction will tell you whether you care an inch for this post or not.

With your expectations set, let’s see how I can develop a really simple Javascript plugin for OmniFocus in about half an hour.

Rubyfocus beta

Rubyfocus is a pure ruby bridge to OmniFocus. It’s something I’ve been working on for a while, and I’m finally able to release a version that, at the very least, functions without crashing (as far as I can tell) anywhere along the way.

Rubyfocus started as a natural offshoot of a previous project, JROFBridge. JROFBridge is an objective-C/Cocoa library that accesses OmniFocus through ScriptingBridge, collects data on projects, tasks and folders, and outputs it to an SQLite database. It’s a handy way of collecting everything you need to know about an OmniFocus document, working through OmniFocus itself. I used it for a web-based Kanban frontend to OmniFocus, which let me view all my projects (and my current workload) at a glance.

Checking running applications the right way

OmniFocus 2 is now in public beta, and I’ve been shifting my scripts over to use its new and improved AppleScript library. Of course, since I ported all my scripts to Cocoa recently, it’s more like I’m digging into the guts of Objective-C, updating some bundled dictionaries, and the like.

All of my OmniFocus export scripts need to check if OmniFocus is running before embarking on data export. Because I’m pulling data out through the app, rather than accessing the database on file, the app needs to be open for these scripts to run. I’ve been using code that looks like the following to do this: