On 3/10/13 at 2:20 PM, Chris <
usabl...@gmail.com> spake thusly:
Assuming you have a tag collection using notes for your To-Do
list, this script will add one or more notes to that list. The
name of each item will be the subject of a selected email. As
written it also adds the contents of each email as the text of
the corresponding Yojimbo note.
The tag used in the script is "to-do". If your tag collections
uses a different tag just edit the line indicated below or your
existing tag.
Save this as a compiled script in the script menu (path =
/Users/*your neme here*/Library/Scripts/Applications/Mail/) and
it will be accessible in Mail.
--> Script <--
try
tell application "Mail"
set msgs to (get selection)
repeat with aMsg in msgs
set theName to subject of (contents of aMsg)
set theContent to content of (contents of aMsg)
my yjItem(theName, theContent)
end repeat
end tell
on error errMsg number errNum
display alert ("Error # " & errNum) message errMsg buttons
{"Cancel"} giving up after 10
end try
on yjItem(theName, theContent)
tell application "Yojimbo"
set itmID to (make new note item with properties
{name:theName, contents:theContent})
add tags {"to-do"} to itmID -- change list item to change tag.
end tell
end yjItem
--> /Script <--
JBS
--
Any sufficiently advanced technology is indistinguishable from
magic. -Arthur C. Clarke