I wrote an AppleScript to archive completed tasks older than a certain date to a text backup file by archive date. Haven't used it for a while because the delete of older completed tasks can now be done by list and never actually went back to the archive over the time period I used it.
Don't know if it will work now, but here's the script to archive:
[B]tell[/B] [I]application[/I] "Reminders"
[B]tell[/B] default account
[B]set[/B] myOldDate [B]to[/B] ([B]current date[/B]) - (30 * days)
[B]set[/B] todo_lists [B]to[/B] [B]get[/B] [B]every[/B] [I]list[/I]
-- lists have reminders. loop thru lists to get their reminders
[B]repeat[/B] [B]with[/B] j [B]from[/B] 1 [B]to[/B] length [B]of[/B] todo_lists
-- if name of list j contains "On Deck" then -- or name of list j contains "Someday" then
[B]tell[/B] [I]list[/I] j
[B]set[/B] todos [B]to[/B] ([B]get[/B] [I]reminders[/I])
-- if there are no reminders for a list, then ignore the list
[B]if[/B] length [B]of[/B] todos [B]is[/B] [B]greater than[/B] 0 [B]then[/B]
-- Write out the name of the list
[B]do shell script[/B] "echo " & (quoted form [B]of[/B] ([B]get[/B] name)) & " >> ~/Desktop/projects.txt"
[B]do shell script[/B] "echo >> ~/Desktop/projects.txt"
[B]do shell script[/B] "echo >> ~/Desktop/projects.txt"
-- loop thru the reminders to get properties
[B]repeat[/B] [B]with[/B] k [B]from[/B] 1 [B]to[/B] length [B]of[/B] todos
[B]set[/B] this_todo [B]to[/B] [I]item[/I] k [B]of[/B] todos
[B]if[/B] completed [B]of[/B] this_todo [B]is[/B] [I]true[/I] [B]then[/B]
[B]if[/B] (completion date [B]of[/B] this_todo) [B]comes before[/B] myOldDate [B]then[/B]
[B]do shell script[/B] "echo [ ] " & (quoted form [B]of[/B] ([B]get[/B] name [B]of[/B] this_todo)) & " >> ~/Desktop/projects.txt"
[B]try[/B]
[B]set[/B] this_body [B]to[/B] (quoted form [B]of[/B] ([B]get[/B] body [B]of[/B] this_todo))
--if body of this_todo is not null then
-- display dialog (quoted form of (get body of this_todo))
[B]do shell script[/B] "echo " & (quoted form [B]of[/B] ([B]get[/B] body [B]of[/B] this_todo)) & " >> ~/Desktop/projects.txt"
[B]do shell script[/B] "echo " & (date string [B]of[/B] ([B]get[/B] completion date [B]of[/B] this_todo)) & " >> ~/Desktop/projects.txt"
--end if
[B]end[/B] [B]try[/B]
[B]do shell script[/B] "echo >> ~/Desktop/projects.txt"
-- remove this line to validate delete list, re-add to remove old todos
[B]delete[/B] [I]item[/I] k [B]of[/B] todos
-- else
-- do shell script "echo [X] " & (quoted form of (get name of this_todo)) & " >> ~/Desktop/completed projects.txt"
[B]end[/B] [B]if[/B]
[B]end[/B] [B]if[/B]
[B]end[/B] [B]repeat[/B]
[B]end[/B] [B]if[/B]
[B]end[/B] [B]tell[/B]
-- end if
[B]end[/B] [B]repeat[/B]
[B]end[/B] [B]tell
end[/B] [B]tell[/B]
That's the script. I originally wrote it to print certain lists when there was no way to print a list from Reminders.
Thanks,
Clayton
p.s.
Well, that paste turned out to be ugly. So much for WYSIWYG