User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

applescripts [2019/02/07 00:05] (current)
admin created
Line 1: Line 1:
 +====== Applescripts ======
 +[[https://​​blog/​2019/​2/​applescript-to-link-to-apple-mail-message|Use Textexpander to create a link back to any email in]]:
 +  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
applescripts.txt ยท Last modified: 2019/02/07 00:05 by admin