The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
OmniFocus bought thru AppStore: Cache-querying scripts fail Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Various scripts on this board query the cache, and typically start with a property like:

Code:
property pstrDBPath : "~/Library/Caches/com.omnigroup.OmniFocus/OmniFocusDatabase2"
AppStore-purchased copies of OmniFocus can not run these scripts without modification.

A possible modification might be something like the following (though this is not bullet-proof):

Code:
set pstrDBPath to 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
--

Last edited by RobTrew; 2011-06-30 at 04:52 AM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network externalities: Appstore-bought OF is worth less RobTrew OmniFocus 1 for Mac 1 2011-06-27 11:18 PM
saving to omnifocus cache... 4 ever! elektroglide OmniFocus 1 for Mac 1 2010-01-22 05:13 PM
saving to omnifocus cache connie OmniFocus 1 for Mac 3 2009-11-15 04:02 PM
OmniFocus: Querying tasks in Applescript gives odd results RobTrew AppleScripting Omni Apps 0 2008-03-01 02:03 AM
Some OmniFocus Scripts curt.clifton OmniFocus 1 for Mac 22 2007-07-23 04:04 AM


All times are GMT -8. The time now is 06:53 AM.


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