Create a Link to an Apple Mail Message

The following script contains an error that appears when I compile it. Any help would be appreciated.

  Returns a link to the first selected Apple Mail message
*)
tell application "Mail"
  set _msgs to selected messages of message viewer 0
  if (_msgs is not equal to missing value) then
    set _msg to first item of _msgs
    set _msgID to do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & (message id of _msg)
    return "message://%3C" & (_msgID) & "%3E"
  end if
end tell

Many thanks ahead of time.

The following script contains an error that appears when I compile it.

It compiles for me just fine, assuming that you leave off the first two lines. Those lines are clearly a comment, but they’re missing the opening (* so the AppleScript compiler doesn’t know that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Create a Link to an Apple Mail Message
 
 
Q