View Single Post
Here's some script I could knock together before my wife came by to pick me up. :-)

This has some limitations, but it's a good skeleton to hang some more code off of, at least.

Things I know need more work:
1) I suspect that the action names and note text needs to be URL-encoded for this to work correctly; a google search may be the best place to start there.
2) Rather than just return-ing the text, you'll need to put it on the clipboard or otherwise send it along to your Mail client...

There are probably other places where this could be improved, as well, but hopefully it helps get you started...

set returnText to "" as text
set taskName to "" as text
set taskNote to "" as text

tell application "OmniFocus"
	set theDoc to document window 1 of default document
	set TaskList to the value of the selected tree of the content of theDoc
	if (count of TaskList) is equal to 0 then -- nothing is selected
		display alert "No items selected" message "To forward an action as email, at least one action must be selected in the frontmost OmniFocus window. Please do so, then try again." buttons {"Stop"} default button 1 as warning
	end if
	repeat with theSelectedTask in TaskList
		set taskName to (name of theSelectedTask as rich text)
		set taskNote to (note of theSelectedTask as rich text)
		set returnText to returnText & ("omnifocus:///add?" as rich text)
		set returnText to returnText & "name=" & taskName & "&note=" & taskNote & return
	end repeat
	return returnText
end tell