OmniFocus 2: Quick defer + due date entry with TextExpander

In OmniFocus 2, there is not a good way to quickly enter a defer date and then a due date: it involves tabbing a bunch of times or using the mouse to move between fields.

TextExpander to the rescue!

I use the following snippets to set the same defer + due date for tasks:

  • Tomorrow at 9am: xx1 → tomorrow 9am%key:tab%%key:tab%%key:tab%%key:tab%tomorrow 9am%key:enter%
  • +2 days at 9am: xx1 → 2 days 9am%key:tab%%key:tab%%key:tab%%key:tab%2 days 9am%key:enter%
  • Next Monday at 9am: xxmon → Monday 9am%key:tab%%key:tab%%key:tab%%key:tab%Monday 9am%key:enter%
  • Next Saturday 9am: xxsat → Saturday 9am%key:tab%%key:tab%%key:tab%%key:tab%Saturday 9am%key:enter%

I also have "x1", "x2", "xmon", and "xsat" set up to work in the quick entry box, which requires a few less tabs.

You can grab all these snippets here.


Ken Case of The Omni Group explains that users will only have to press tab four times if they have the "All controls" checked in the Full Keyboard Access portion of System Preferences > Keyboard Preferences > Shortcuts. I always have this turned on, like many users, so I can tab between form controls.

So if you don't have this enabled, you'll need to adjust the number of tabs in the TextExpander snippets. I still think this idea is useful for quickly setting defer+due dates if you often use the same sets of dates, even if the fields are only one tab away.

OS X: Set the output device for sound effects with AppleScript

When I switch audio output devices from LaunchBar, sometimes Mavericks decides to change my system sound effects to my laptop's internal speakers rather than the selected audio device, which is what I always want.

The command line utility I use to switch audio output sources doesn't support changing the sound effects output device, so I threw together an AppleScript. The AppleScript has to pull up the Sound panel in System Preferences on the screen, so it takes a second to run, but it's still way faster than doing it manually.

FastMail: Hide unread count for folder with a Userscript

I just wrote a JavaScript snippet to hide the unread count on folders in the FastMail web interface's sidebar. I use this with's Userscript support.

Here's the snippet:

window.mmHide = function() {
    jQuery('.FolderTree span:contains("Folder 1 name here") + .badge').hide();
    jQuery('.FolderTree span:contains("Folder 2 name here") + .badge').hide();
    // Duplicate previous line as needed

jQuery(function() {
    setTimeout(window.mmHide, 1000);
    setInterval(window.mmHide, 10000);

You'll need to also include jQuery as a Userscript. (You can just copy/paste the minified jQuery above this snippet in your Userscript.) I'm sure there's a non-jQuery way to do this but I already have jQuery available so this was easiest.

OS X: Quickly switching audio output devices

The first step is getting AudioSwitcher. This involves downloading the Xcode project at the previous link and building to get an AudioSwitcher binary. I discovered Dr. Drang keeps a bin/ directory in Dropbox, so that's what I'm doing as well. This means that I now have the AudioSwitcher binary in ~/Dropbox/bin/, and this folder is in my $PATH.

If you've done this correctly, you should be able to run AudioSwitcher -a and see a list of devices:

$ AudioSwitcher -a
Built-in Microphone (input)
Monitor Webcam (input)
Built-in Output (output)
FiiO USB DAC-E10 (output)

Now, set up some AppleScripts to run AudioSwitcher commands. For example, to switch to my DAC, all you need is:

do shell script "/Users/max/Dropbox/bin/AudioSwitcher -s 'FiiO USB DAC-E10'"

I used the AppleScript Editor and saved the script as an application in /Applications so I can trigger it quickly with LaunchBar.

(If you trust me, you can download a compiled version of AudioSwitcher here. The standard disclaimer applies, and you really shouldn't be running software from random people on the internet.)

Zotero: quickly get links to library items using zotero:// url scheme links

I use Zotero for managing my digital library of scientific papers. Sometimes I want to link back to papers in my Zotero library from other applications, but there's no built-in way to do this.

Fortunately, Zotero is incredibly extensible and has a solid community of users who have developed various add-ins. Based on some plug-ins linked to in this forum thread, I created a Translator plug-in to get the output I wanted.

Here's how it works:

1) Select one or more papers in Zotero:

2) Press command-shift-c (on the Mac; probably ctrl-shift-c on Windows) to a "Quick Copy", or drag-and-drop the selected items onto another application.

3) You should see output like this:

zotero://select/items/0_HGFPVI65 - Sickle cell trait is not associated with endemic Burkitt lymphoma: An ethnicity and malaria endemicity-matched case-control study suggests factors controlling EBV may serve as a predictive biomarker for this pediatric cancer: Sickle cell trait and EBV loads in endemic Burkitt lymphoma - International Journal of Cancer (Mulama et al. 2014)

zotero://select/items/0_Q8GZQSJT - Rates and determinants of seasonal influenza vaccination in pregnancy and association with neonatal outcomes - Canadian Medical Association Journal (Legge et al. 2014)

zotero://select/items/0_HKRG6JXP - Capture–Recapture Method for Estimating Annual Incidence of Imported Dengue, France, 2007–2010 - Emerging infectious diseases (La Ruche et al. 2013)

zotero://select/items/0_9QST5VPW - Lifetime pesticide use and telomere shortening among male pesticide applicators in the agricultural health study - Environmental health perspectives (Hou et al. 2013)

The "zotero://" links will take you directly to the corresponding item in Zotero. 

Installation instructions

To install, grab the code from this gist and create a new file in the "translators" folder in your Zotero library folder called "modified-zotselect-link.js". Then go to your Zotero preferences, open the "Export" tab, and select "Modified ZotSelect Link" from the "Default Output Format" dropdown under "Quick Copy".

How to fix disappearing calendar invitations sent from an iCloud calendar

I recently ran into an annoying situation where invitations sent using my iCloud calendar (from and from on OS X).

Let's say I'm inviting to an event:

But, never receives my invitation!

What is happening is that iCloud sends calendar invitations on the server side. So when you invite someone to an event in any iCloud client (, BusyCal,'s calendar, etc.), the client creates the event with the invitation on the server, and then the iCloud server sends an email to whatever address you specify with the invitation ( in this case).

This works great except when John has added to his Apple ID. (He might do this so he can send iMessages from this email address, for example.) If John has done this, the iCloud server that usually emails invitations decides that he must be using an iCloud calendar and the invitation goes straight into his iCloud calendar notifications. It is never delivered to his inbox as an email, like would happen for non-iCloud users.


There are two ways to fix this problem, but unfortunately they are both on the recipient's side (there's nothing you can do as the event creator).

First, the recipient needs to go to and look under "alternate email addresses" to see if his email address is listed here. If it is, there are two options:

  1. Remove the email address from the Apple ID (which may break other Apple services like iMessage using this email account); or
  2. Go to, log in, click on the "Calendar" icon, click on the gear in the bottom left corner, click "Preferences", click "Advanced", and then change "Receive event notifications" from in-app to "Email to".

Bottom line

If you use iCloud calendars to send events to people who do not use iCloud calendars, but might have associated their email address with an Apple ID, you have to manually check with them to make sure they received your event invitation. 😒