The Omni Group Forums

The Omni Group Forums (
-   OmniFocus 1 for Mac (
-   -   How to clip and parse (

Mondozer 2011-09-07 03:21 PM

How to clip and parse
I would like to write this string in a DevonThinkPro Rich Text file, send it to OmniFocus and have it parsed just as if it was an Email so that I don't have to reenter the info in the quick entry window.


Is possible?


whpalmer4 2011-09-07 04:51 PM

1 Attachment(s)
Yes, with a little help from Applescript. I've attached a script which will take the contents of the clipboard and run it through the same parsing that would happen if it came in via email. You could bind the script to a keystroke with something like [URL=""]FastScripts[/URL], or if you are likely to always be using one app (DTP, for example) you could put it in that app's Applescript folder so it would appear in the script menu in that application. Select your text, do command-C to copy to the clipboard, invoke the script.

Read about how to install and use Applescripts [URL=""]here[/URL].

Mondozer 2011-09-08 11:55 AM

Way cool, whpalmer4. And thanks for such a quick answer.

Mondozer 2011-09-08 11:59 AM

How did you know about ParseStr?

whpalmer4 2011-09-08 12:24 PM

[QUOTE=Mondozer;101510]How did you know about ParseStr?[/QUOTE]

I knew about it because it was my own invention :-)

It's just the variable name I chose to hold the string obtained from the clipboard, nothing special about it.

"parse tasks" is the Applescript verb that does the work. That I knew about from reading the OmniFocus Applescript dictionary in the Applescript Editor app and looking at the Applescript buried inside the OmniFocus app that gets run from Mail if you're using the email processing feature.

Mondozer 2011-09-08 02:21 PM

Very clever. I didn't know how to look inside the OF app and find how the Mail input was parsed. Anyway, thanks again. You saved me endless time and toil. Now I can get on with my work.


whpalmer4 2011-09-08 02:59 PM

Applications are actually directories full of files (called packages), with a bit set that tells the Finder to put on the illusion that it is just one item. If you want to look inside one, select it, either right-click or control-click, and choose Show Package Contents from the popup menu that appears. Or you can choose Show Package Contents from the gear menu in the Finder toolbar. A new window will open showing you the contents of the package.

Some of the Omni document formats are also packages. If you might need to change only parts of a file, using a package can be much more efficient if the file is large. OmniFocus stores its database as a package consisting of 1 file containing the bulk of the data plus a small file for each additional change that hasn't been compacted into the big chunk. OmniOutliner and OmniGraffle use packages so that you can easily attach files to documents by just copying the data into the directory instead having to create an entirely new file.

It's interesting to spend some time rummaging through all of the folders in an application, seeing all the pieces that are involved makes you appreciate how much work was done on your behalf in exchange for your cash :-) The copy of OmniFocus I just checked has over 3,500 files in it! Of course, having language localizations for several languages makes that count climb rapidly.

All times are GMT -8. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.