This information is for TaskPaper 2 which is old and outdated. TaskPaper 3 is the current version of TaskPaper. For TaskPaper 3 support please visit the support forums.

This script deletes all tasks in the current project tagged with @done.

tell application "TaskPaper"
    tell front document
        set p to containing project of selected entry
        set done_entry_ids to {}
        repeat with each in entries of p
            if exists (tag named "done" of each) then
                set done_entry_ids to done_entry_ids & id of each
            end if
        end repeat
        repeat with each in done_entry_ids
            delete entry id each of p
        end repeat
    end tell
end tell