Toys: March 2008 Archives

Sometimes something (I suspect iSync) screws up and duplicates my tasks. This has proven useful:

tell application "OmniFocus"
  tell first document
    repeat with aContext in contexts
      set toDelete to {}
      set seen to {}
      repeat with aTask in tasks of aContext
        if seen contains name of aTask then
          set end of toDelete to id of aTask
        else
          set end of seen to name of aTask
        end if
      end repeat

      repeat with aTask in toDelete
        try
          delete (task id aTask)
        end try
      end repeat
      count of toDelete
    end repeat
  end tell
end tell

About this Archive

This page is a archive of entries in the Toys category from March 2008.

Toys: February 2008 is the previous archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1