Instantly share code, notes, and snippets.

Embed
What would you like to do?
AppleScript application to open x-dispatch:// links in Postbox on OS X
on open location messageUri
(*
Extract message ID from the message:// URI. Where [MESSAGEID] is the message ID,
the Dispatch OS X URL Helper sets up URLs for Mail.app in the following format:
message://%3c[MESSAGEID]%3e
*)
set messageId to text 14 thru -4 of messageUri
do shell script "open x-postbox-message://" & messageId
end open location
@Cottser

This comment has been minimized.

Owner

Cottser commented Apr 3, 2014

Copy and paste this into AppleScript Editor and save it as an application. This relies upon the Dispatch OS X URL Helper and I used the RCDefaultApp preference pane to change the default handler for message:// URLs to this AppleScript application.

@thatchrisblack

This comment has been minimized.

thatchrisblack commented Apr 18, 2014

Got this installed, and clicking on x-dispatch URLs in OmniFocus does open Postbox. It never actually loads the relevant message though.

Any pointers to getting this going?

@Cottser

This comment has been minimized.

Owner

Cottser commented Oct 25, 2014

I don't think I missed anything in the instructions but someone on Twitter seems to be having a similar issue. I'll update here if I find anything else but this is still working for me.

@Cottser

This comment has been minimized.

Owner

Cottser commented Oct 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment