Getting MailMate's Bundles working with OmniFocus 2

Unfortunately, I can’t reproduce this behavior on my Mac. When I choose the keybinding in MailMate for the OF bundle, I get a OF Quick Entry box populated with the e-mail subject in the Item Name field and the content of the e-mail in the notes area … with the Item Name highlighted.

When I tab, the cursor moves to the notes field (not the project, context, etc. drop downs); but this is the way the Quick Entry box works system-wide for OmniFocus 2.

Thanks for the reply. Now it’s working fine for me. Maybe I should I have done a restart of Mac after installing. Sorry for any unintended confusion. Many thanks for the updated script!

It seems that the Mailmate script no longer works. Anything new we can use? (Was working fine until some point on 4/28. A new version of OF must have broken the script.)

Yes, it stopped working for me as well.

I’m seeing an unresponsive OmniFocus — is that what you folks are?

OK, I think this might be the correct bit for create_task:

on run argv
	set theFilename to item 1 of argv
	set theName to do shell script "head -n1 " & theFilename
	set theNote to do shell script "tail -n+2 " & theFilename
	
	tell application id "com.omnigroup.omnifocus2"
		tell default document
			tell quick entry
				make new inbox task with properties {name:theName, note:theNote}
				open
				set note expanded of tree 1 to true
				-- tell application "System Events" to keystroke tab
			end tell
		end tell
	end tell
end run

I moved set note expanded of tree 1 to true to after the open command. It works for me now.

(Keep in mind AppleScript is not my day job. But now it works, so that might be the actual fix. :) )

1 Like

Thanks for finding a solution! However, what do I do to implement this? All I’m finding within Mailmate is the OmniFocus.mmBundle (I am soooo not a coder). How do I open? With what? Or is there a re-download available somewhere?

Hey Mitchell. I ran into problems with having a hodgepodge of bundles, so I took the time to get things figured out and feel a bit more confident about sharing.

If you download this bundle, install it to ~/Library/Application Support/MailMate/Bundles/, and then relaunch MailMate, it should be good to go. By install, I mean unzip the file and put OmniFocus.mmBundle in that Bundles folder.

How’s that work?

This new one is working for me if and only if I already have OF open. If I do not, the quick entry screen appears and acts essentially as a blank modal dialog box.

Ditto for me. Works fine if OF already open (which normally it would be). I also get the blank modal dialog box if OF not open.

In practice this routine now works fine since when isn’t OF open? :) But it’s obviously a bug, and I have no idea if it’s easy or hard to address.

1 Like

Looks like it! (A bug, perhaps?)

If I disable this line
--set note expanded of tree 1 to true
it works as expected. (You just need to manually open the notes field if you want to edit.)

To disable that line, edit ~/Library/Application Support/MailMate/Bundles/create_task and add -- before set note expanded of tree 1 to true.

The bundle doesn’t work if OF2 was acquired via the App Store; the application ID needs to have .MacAppStore appended to “omnifocus2”. After restarting MailMate, the keybinding now works.

If the content being added to the Quick Entry window is HTML, it’s adding the raw code rather than the “browser” version.

Is there a way to have it presented that way, as the Mail.app keybinding does?

Thanks,

Des

where do you change the application ID ?

Please anyone,
I switched to the MAS version and cannot get this bundle working anymore
Help !

Ditto. I would really like to get this working with the App store version.

I’ll take a look!

Edit: OK, I think this’ll do the trick for you, @deladriere and @steve.

Download this Mac App Store bundle and… [quote=“derekr, post:19, topic:92”]
install it to ~/Library/Application Support/MailMate/Bundles/[/quote]

and then relaunch MailMate.

If a bundle already exists there, delete it and install this instead.

Derek, thank you for the bundle. It works perfectly. I appreciate all the work you do to help us out.

1 Like

Thank you so much
note : this is the “normal” ^A command and needs to be edited to work with the F1 key

1 Like

~/Library/Application\ Support/MailMate/Bundles/OmniFocus.mmBundle/Support/bin/create_task

Edit this line and append .MacAppStore as here:

tell application id “com.omnigroup.omnifocus2.MacAppStore”

Des