Tweetbot 3 Questions and Answers — Tapbots Blog

AppleScript and Notification Center in Mavericks

⌃⌥⌘W is my work-mode toggle. That shortcut fires off a Keyboard Maestro workflow that does a number of things, from killing my email clients to setting all of my chat applications to do-not-disturb mode. If I’m already in work mode, pressing the shortcut again sets my chat status to Available and relaunches my email clients. I use it when going into and coming out of meetings, focused coding sessions, etc.

It also turns off all notifications by -clicking the Notification Center icon in the menu bar.1 Unfortunately, upgrading to Mavericks broke the Notification Center toggle, which is my favorite part of the workflow.

Here’s what the script used to look like:

tell application "System Events"
    tell process "Notification Center"
        key down option
        click first menu bar's first menu bar item
        key up option
    end tell
end tell

After a fair amount of digging, I managed to repair it. For some reason, click first menu doesn’t work anymore; click second menu does. Here’s the updated snippet:

tell application "System Events"
    tell process "Notification Center"
        key down option
        click second menu bar's first menu bar item
        key up option
    end tell
end tell

It’s a small tweak, but I couldn’t find it documented anywhere and discovered it through experimentation. Despite its relative obscurity, I rely on AppleScript quite a bit (and have for quite some time), which makes me wish for more thorough documentation–especially for weird changes like this.


  1. In case you didn’t already know, -clicking the icon in the top right corner of your screen disables all notifications for up to a day. You can re-enable them by -clicking the icon again.  ↩

More is less: Obamacare’s ‘tech surge’ adds manpower to an already-bloated project | The Verge

This is what Instagram ads will look like. First sample coming to the US in the next week

Lazy Markdown Reference Links for Editorial

I read this article by Brett Terpstra last night and got inspired. He uses a “lazy” Markdown reference link style while writing that removes a bit of work. It looks something like this:

I read [this article][*] by [Brett Terpstra](https://twitter.com/ttscoff "Twitter") last night and got inspired. He uses a "lazy" Markdown reference link style while writing that removes a bit of work. It looks something like this:

[*]: http://brettterpstra.com/2013/10/19/lazy-markdown-reference-links/

Instead of creating a link identifier at the exact moment you create the link, you can use a *. Simple! He included a script that works as a custom preprocessor for Marked, too, that converts the lazy links to numerically indexed reference links.

I loved this idea–it jibes with my writing style–so I adapted it for Editorial.

There are two workflows that you’ll need to install. The first will let you create a lazy reference from either a URL on the clipboard or whatever page is open in the in-app browser. The second workflow parses the lazy references in your document and turns them into proper reference links with numbers for reference IDs.

You can view and install the workflows using the links below.


I ran a quick poll on App.net to see which features of OS X Mavericks people were looking forward to the most. Keep in mind that this crowd skews nerd-heavy, which is why–despite having many options to choose from–only four features made it into the results.

Supplemental: Using Drafts

I’ve been working on the next entry in my series on writing. It’s about capture, and–spoiler alert–I rely pretty heavily on Drafts.

It took me a while to fully understand why this app is so amazing. Since it’s such an essential tool for my next piece, I thought it might be a good idea to explain my ah-ha moment. If you’ve looked at Drafts before and didn’t understand it, maybe I can help you see why it’s such a handy piece of software.

Here’s the secret: text doesn’t live in Drafts. Drafts is temporary storage; it’s not Evernote, and I don’t believe it was ever intended to be anything of the sort.

Sure, it has a nifty sync service to synchronize all of your notes between your devices, which is great. But the real power in Drafts is speed combined with the ability to send stuff elsewhere. It’s a high-velocity conduit. I use it primarily to send text to either Dropbox or Evernote (and sometimes OmniFocus).

“I already have the Evernote app installed. And I can save text to Dropbox with Byword/iA Writer/some other editor.” – You, just now

Sure you can, but I’ll bet dollars to donuts that I can do it faster than you.

When I pick up my phone to jot something down, I never have to think, “Which app do I open? Where is this going to live? What type of thing am I making note of?” It all starts with Drafts, and once it’s written down, I can toss it into any number of lists, notebooks, or Dropbox folders with two taps. Drafts removes friction.1 It reduces the up-front cognitive load associated with persisting data in my outboard brain.

If you want to test the efficiency of any capture system, try getting an idea out of your head when your 18-month-old toddler is feeling particularly impatient. Drafts makes this possible for me. It’s earned a place in my dock on both my iPad and iPhone, and I don’t see it leaving anytime soon.


  1. Noticing a theme?