View Single Post
Quote:
Originally Posted by grichar1 View Post
Is there a way to invoke the Clip-o-Tron from within a Mail rule?
The only way I can think of would be to use UI scripting to click on the Clip-O-Tron's menu item:

Code:
activate application "Mail"
tell application "System Events"
	tell process "Mail"
		click menu item "OmniFocus: Send to Inbox" of menu 1 of menu item "Services" of menu 1 of menu bar item "Mail" of menu bar 1
	end tell
end tell
I'm not sure if that works from a Mail rule or not; presumably you'd want to make sure the message was selected in the frontmost viewer before you invoke the clipping service.

Quote:
Alternatively, is there a script out there that replicates the Clip-o-Tron functionality more completely than OF's mail action script?

Specifically, I need to be able to automatically process certain emails (file, change the status of parent emails, add MailTag projects etc. and send them to OF 1) with their attachments (if present) and 2) auto-assigning the project.
Unfortunately, AppleScript doesn't really support rich text with embedded attachments (such as inline images): that's why we wrote the Clip-O-Tron using pasteboard services (augmented with AppleScript) rather than simply using AppleScript by itself.

(I'm not quite sure what you mean by "auto-assigning the project"; it's definitely possible to look up projects and assign them to tasks you create from AppleScript, and I think there are some examples posted which do this.)