Skip to content

Instantly share code, notes, and snippets.

@star-szr
Created April 3, 2014 03:02
Show Gist options
  • Save star-szr/9947577 to your computer and use it in GitHub Desktop.
Save star-szr/9947577 to your computer and use it in GitHub Desktop.
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
@star-szr
Copy link
Author

star-szr 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
Copy link

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?

@star-szr
Copy link
Author

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.

@star-szr
Copy link
Author

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