Skip to content

Instantly share code, notes, and snippets.

@persquare
Last active August 29, 2015 14:02
Show Gist options
  • Save persquare/238fef09c15bf26c4593 to your computer and use it in GitHub Desktop.
Save persquare/238fef09c15bf26c4593 to your computer and use it in GitHub Desktop.
property inbox_cmd : "$HOME/Tools/bin/inbox"
tell application "Mail"
set theMessages to selection
repeat with msg in theMessages
set title to subject of msg (* Strip Re: etc. *)
set link to "message://%3C" & message id of msg & "%3E"
set arg to title & " " & link
do shell script inbox_cmd & " " & quoted form of arg
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment