PDA

View Full Version : How to make OmniFocus work with File Maker Pro?


Indyprint
2012-07-20, 02:51 PM
How anyone know how to enable my Filemaker database interface with OmniFocus?


Thanks!

RobTrew
2012-07-21, 06:08 AM
You can read the OF cache through SQLite SQL, but don't try writing to it.

Indyprint
2012-07-21, 11:15 AM
Thanks...though I'm not sure I follow. Is that an app a plugin or some other way of interfacing FMP w/ OmniFocus? Thanks!

RobTrew
2012-07-21, 02:58 PM
sqlite3 is a standard command in OS X installations.

Probably only an option if you're familiar with (or happy to learn) some SQL.

For the relevant dialect of SQL: http://www.sqlite.org/

Google searches for

filemaker sqlite3 | sqlite

will lead you to examples of the options for reading from the FileMaker end.

(as I mentioned, writing to the cache is not an option)

You can track down the location of the OmniFocus sqlite cache by running code like:

GetCachePath()


on GetCachePath()
set strDefaultFolder to "~/Library/Caches/com.omnigroup.OmniFocus"
set strAppStoreFolder to "~/Library/Caches/com.omnigroup.OmniFocus.MacAppStore"
set strDBName to "OmniFocusDatabase2"

set strCacheFolder to strDefaultFolder
if (do shell script ("test -d " & strCacheFolder & "; echo $?")) ≠ "0" then
set strCacheFolder to strAppStoreFolder
if (do shell script ("test -d " & strCacheFolder & "; echo $?")) ≠ "0" then return ""
end if

return strCacheFolder & "/" & strDBName
end GetCachePath

RobTrew
2012-07-21, 03:16 PM
General pattern, from the command line:

OFOC=$(osascript -e 'tell application "Finder" to get id of application file id "OFOC"')
sqlite3 ~/Library/Caches/$OFOC/OmniFocusDatabase2 'select count(*) from task where projectInfo is null and childrenCount=0'