Skip to content

Instantly share code, notes, and snippets.

@webb
Created December 22, 2015 13:54
Show Gist options
  • Save webb/4667ca77d44219cee92d to your computer and use it in GitHub Desktop.
Save webb/4667ca77d44219cee92d to your computer and use it in GitHub Desktop.
Copy Mac Mail.app message URI to clipboard
# Save as "Copy Mail message URI to clipboard.scpt" in ~/Library/Scripts/Applications/Mail
tell application "Mail"
set theSelectedMessages to selection
set the selected_message to item 1 ¬
of the theSelectedMessages
set message_id to the message id of the selected_message
end tell
set the clipboard to "message://%3c" & message_id & "%3e"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment