View Single Post
I'm posting the text of the applescript here, for folks who don't want to have to create a forum account in order to download the applescript file.

They can copy the code below, paste it into a new Script Editor document, and save and/or run the script that way.

Code:
set temporaryArchive to POSIX file "/tmp/CoalescedDatabase.ofocus"
tell application "Finder"
	try
		-- Make sure our temporary archive doesn't already exist
		delete temporaryArchive
	end try
end tell

tell application "OmniFocus"
	-- Find the database path
	set databasePath to file of front document
	
	-- Save this database into our temporary archive
	archive front document in temporaryArchive without summaries
	
	-- Close our broken database, open the repaired temporary archive
	close front document
	open temporaryArchive without using cache
	
	-- Replace our local database with the coalesced copy
	tell application "Finder"
		delete databasePath
	end tell
	archive front document in databasePath without summaries
	
	-- Open the coalesced database
	close front document
	open databasePath without using cache
end tell