Perhaps something along these lines:
Code:
tell application id "OFOC"
tell front document window of front document
tell content
set lstTask to value of selected trees where class of its value is task or class of its value is inbox task
repeat with oTask in lstTask
tell oTask to set {its repetition rule, completed} to {missing value, true}
end repeat
end tell
end tell
end tell