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 document tagged with @done.

tell application "TaskPaper"
    tell front document
        set selected_entries to get entries
        repeat with each in selected_entries
            if (exists tag named "done" of each) then
            delete each
            end if
        end repeat
    end tell
end tell