Before I begin to overhaul my entire workflow, I figured I would ask a question here first.
I currently have a Mail.app rule setup to pipe emails sent to a specific email address to Yojimbo using applescript.
Is something like this possible with EF. I searched around on the interwebs for a bit, but didn’t see anything that jumped out at me and I am not proficient enough to attempt developing a solution myself.
I don’t see why not. You can import text into EagleFiler like this:
tell application "EagleFiler"
tell library document 1
import plain text "this is a test"
end tell
end tell
so it should be easy to adapt your existing script. However, this would not take advantage of EagleFiler’s special support for mail (smarter display, efficient storage, and specialized searching); it simply imports a text file (or RTF file if you use “import text”). To import mail as mail, it would be better to select a mailbox in Mail and press the capture key.
Thanks for the info. I really don’t need a lot of special formatting. It’s basically an email address I send notes to from my iphone while out and about that get processed automatically for later attention.
With that said, is there anyway to invoke the capture key or services menu item via applescript?
In that case, importing as text is probably better.
Yes, but that doesn’t really make sense. Those both act on what you’ve selected in the user interface. For an automated solution (e.g. using a Mail rule) you need to work with the message that the rule is processing, so it’s better to use the import script command (as above).
I have a case where I think a script to invoke the capture command does make sense. I use Mail Act-On in Mail, and I have an Act-On rule that moves selected e-mails to my “Receipts and Accounts” mail folder. It would be handy if I could invoke the capture key in that same rule. That way I only have to perform one set of key strokes on those messages.
But at the moment i don’t know how to go about doing this. I know very little about Applescript.
One question in that regard, though. Is it possible to specify which Library the selected mail messages are to be filed in? I currently have three libraries, and I want to make sure they go to the right one.
My you are fast to respond! Thank you! I just came back to tell you I’d found an answer–sort of.
I’m evaluating Together at the same time I’m testing EagleFiler, and I checked their forums for the same thing. Someone there had suggested the key code applescript in an earlier thread, and I realized that it would work for EagleFIler, too.
The only problem I have is that I get a mail error because Mail is also moving messages as part of the same rule. So unless there’s a solution I don’t know about, it would appear I’m back to moving and importing the e-mails separately. Hardly the end of the world.
By the way, thank you very much for the list of key codes. I have no doubt that will come in handy at other times.
Yeah, it’s not a good idea to use the capture key when Mail’s underlying message files are in flux. In this case, I would suggest using a script that asks Mail for the source of the message, writes it to a temporary .eml file, and then imports that file into EagleFiler using the normal AppleScript commands.
In my particular case, having it “baked” in the script would work fine, as I’m using it in a set of rules that apply to messages which go all to the same library.