Re: Get .emlx file for Mail message?
Re: Get .emlx file for Mail message?
- Subject: Re: Get .emlx file for Mail message?
- From: John M <email@hidden>
- Date: Sat, 23 Sep 2006 19:06:34 +0100
Is there any way, in AppleScript or otherwise, to quickly identify the
.emlx file corresponding to a given message in Mail?
Yes,
This script uses Mail to get the message 'id', does a 'spotlight'
search using mdfind against the id, then url encodes the resulting
file path. The mdfind script is a bit slow though (taking about 5
seconds on my machine).
Select a message in Mail then run this script:
--
tell application "Mail"
set myID to id of (first item of (get selection))
set myFile to paragraph 1 of (do shell script "mdfind
\"kMDItemFSName == " & myID & ".emlx && kMDItemKind == 'emlx'\"")
set myPath to "file://" & (do shell script "python -c 'import sys,
urllib; print urllib.quote(sys.argv[1])' " & quoted form of myFile)
end tell
--
Best wishes
John M
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden