AppleScript for removing note text in items captured from Reminders

OmniFocus engineer and famous AppleScript-er @curt was kind enough to write a quick script for batch-removing the text ‘Original task available in the “Captured by OmniFocus” list in Reminders.’ from your items. We’ve added a preference to stop this text from being added in the first place to v2.9 of the mobile apps, but the script should help in the meantime and for any clean-up that might be necessary afterwards.

If you need more info about using AppleScript in OmniFocus, check out the Docs page.

(*
	This script clears notes added to items by OmniFocus when capturing from Reminders.
*)

-- This matches the note text in English. The string will need to be modified for other localizations:
set noteTextToRemove to "Original task available in the “Captured by OmniFocus” list in Reminders."

(*
	Main entry point.
*)
try
	set theResponse to display dialog "Really remove redundant notes from OmniFocus Reminders Capture?" buttons {"Remove Notes", "Cancel"} default button "Cancel" cancel button "Cancel" with title "Remove Redundant Notes?" with icon caution
on error
	return
end try
tell application "OmniFocus"
	tell front document
		set will autosave to false
		try
			repeat with aTask in (every flattened task whose note is noteTextToRemove)
				set note of aTask to ""
			end repeat
		on error
			beep
		end try
		set will autosave to true
	end tell
end tell
my notify("Notes Removed", "Reminders Capture notes removed from all items in the database.")

(*
	Uses Notification Center to display a notification message.
	theTitle – a string giving the notification title
*)
on notify(theTitle, theDescription)
	display notification theDescription with title theTitle
end notify
5 Likes

I really want to enable that preference, but… where is it? I can’t find it anywhere!

Sorry about that! It’s a hidden preference - the URLs are in the release notes for 2.9:

https://www.omnigroup.com/releasenotes/omnifocus-ios/2.9

omnifocus:///change-preference?RemindersCaptureShouldAddNoteAboutOriginalTask=false

turns off the text, and

omnifocus:///change-preference?RemindersCaptureShouldAddNoteAboutOriginalTask=true

turns it back on.

This whole thing has proven to be so troublesome that in 2.10 we’ve reverted to the pre-iOS 9 behavior for Reminders capture (no note text, and no “Captured by OmniFocus” list).

1 Like

Ah, thanks! That works!