C-Command Software Forum

Using EF with Indev's Mail Perspectives

I am checking out Mail Perspectives from Indev (using the latest beta for Lion). Trying to capture an email that is open through Perspective into EF fails with the following message from EF:

*An error occurred when capturing from Mail:

Make sure that a viewer window (the kind created by File > New Viewer Window) is in front and that Mail is not in Full Screen mode.*

The message is indeed not showing in a native Mail Viewer window, but through Perspectives. Is that something that EF can deal with (key capture is the quickest way for me to drop mails into EF)?



It appears that the Mail Perspectives window is not AppleScriptable.

Which would be a requirement for the capture key to work I assume? MailTags lost its scriptablility for a little while during Beta, but then regained it. I will put in a ticket with the Perspectives folks…

Michael, I think it is. I ran the following script:

tell application "Mail"
    subject of item 1 of (the selection as list)
end tell

I ran it while having one the the Mail Perspective window messages selected, and it returned the subject of the mail. Any thoughts?

It can get the selected messages at the application level, but it’s not fully scriptable in the sense that the perspective window (at least as far as I can tell) does not appear as a distinct kind of scriptable object, with a list of messages. One of the problems this causes is that a script cannot tell whether the application-level selection of messages is actually in the frontmost window. So it could end up importing different messages than what the user is expecting. For this reason, I do not want to add Mail Perspectives support to EagleFiler proper. However, if you want to give it a try you could install the attached capture script.

Thank you very much, Michael - I will pass the comment along to the MP folks. The attached script - do I need to associate it with the capture action? How would I do that?



If you put it in the folder:

/Users/<username>/Library/Application Support/EagleFiler/Capture Scripts/

it will override the version that’s built into EagleFiler.

Phenomenal, Michael, it works!

Thanks as always.

I’ve discussed this with Scott, the Mail Perspectives developer, and it looks like an upcoming version of Mail Perspectives will be able to work correctly with the standard EagleFiler capture script.

Indev fixed their code…

I shared what you told me with the Indev folks. They applied a fix to the MailPerspectives code (I am pasting what they say below). With the fix, the capture brings in the email as a Mailbox rather than eml file.

If you are interested, the fix can be found here: http://dl.dropbox.com/u/2113086/Prerelease/MailPerspectives1.1b756.dmg

The Indev support person said the following once I pointed to your script:

Hi Daniel – I think we were coming at it from different angles. My work actually should make the perspective windows accessible via applescript (they should essentially appear as viewer windows to the calling applescript)

His script essentially works around the older version of MP not exposing its windows to applescript.

The thing is, I did not remove your script and it seems to work fine (not sure whether I should remove it or not).


So it seems! It will make my world much better. Now I will need to get Evernote integrate with the overall workflow of things, but that will be a separate post to the forum…