Jump to content

Applescript for Mail message url when using selected text

Recommended Posts

Have been trying all night to get the message url in my notes when I use an Applescript service to copy the selected text (not full mail) into a new note, with a predefined tag (I use different services with short keys) for different tags.


Am not highly experienced, but eager to learn.

Have tried many different methods from different forums, but none seem to work. Is it because the text is selected and not the message? I used to have a similar service from the application Things where I managed my GTD. Now want to transfer my work to Evernote.


My script is the following, your feedback will be very welcomed!


on run {input}

tell application "Evernote" to activate

set theTitle to the text returned of (display dialog "Title of the Note?" default answer "")


repeat with selectedText in input

tell application "Evernote"




set evNote to (create note with text selectedText)

repeat with theTag in {"0Stuff"}

assign tag theTag to evNote

end repeat

set the title of evNote to theTitle

set the source URL of evNote to evSource

set the creation date of evNote to evCreationDate

set theMessageURL to "message://%3c" & theMessage's messageid & "%3e"


end try

end tell

end repeat

end run



Link to comment


This topic is now archived and is closed to further replies.

  • Create New...