Bulk Setting “Catch Up Automatically” in OmniFocus
It turns out that one of my favorite new features in OmniFocus 4.7 is the Catch Up Automatically option for repeating actions:
With this setting turned off, completing an item will create the next occurrence following the schedule you have set, even when the next occurrence is in the past.
With this setting turned on, completing an item will create the next occurrence following the schedule you have set, skipping any occurrences in the past.
I have lots of repeating actions (e.g. for grocery shopping) that I want to do once every week or two. After I complete an action, I want it to disappear temporarily, but then I want it to reappear the next day for planning purposes. Setting the Defer Date to tomorrow and the repeat interval to just one day will make the action reappear as desired, but then when I complete it a week later I’ll have to tap it six times, because a new action will be created for each intervening day.
With Catch Up Automatically, only one new action will be created, and it will again be deferred until the next day. This exactly what I want. I can control which actions are available by bumping the Defer Date by one or two days, or a week, complete an action with a single tap, and have it come back the next day. (I suspect there may also be a way to solve this problem using the new Planned Date feature and a custom perspective that filters based on that, but I like the Defer Date because it works consistently across views.)
The problem with Catch Up Automatically is that it’s awkward to set. There’s no menu command. You have to open the inspector, open a popover, and click a checkbox. This does not work with a multiple selection (unless, I guess, the repetition parameters are identical) so it has to be repeated for each action. What I wanted was a way to set Catch Up Automatically in bulk, with just a keyboard shortcut. Naturally, I thought of writing an AppleScript and invoking it with FastScripts. Here’s the script I ended up with.
There’s a bunch of boilerplate in order to iterate over the selected actions. The meat of the script is just setting the catch up automatically property to true. Unfortunately, there’s a bug where this change doesn’t get saved. Fortunately, an Omni support person showed me that it does get saved if you set it using the JavaScript API (a.k.a. Omni Automation). I should probably start writing all my scripts in JavaScript, anyway, because then they’d work on iOS, too. But it’s cool that on the Mac you can mix and match, calling JavaScript from within an AppleScript, as shown in this script.
In some ways, e.g. iterating over the selection, the JavaScript API is much more compact, but AppleScript is nicer in that you can just mutate a property of the repetition rule. With JavaScript, you have to create a new rule and pass in all the properties as unlabeled parameters.
Previously: