View Single Post
Hello

This is actually an applescript problem, but Omnifocus related.

I like to delete a line (paragraph) from a task's note. Here is the method:

Quote:
on removeTotal(myNote)
set myLines to paragraphs of myNote
repeat with i from (count myLines) to 1 by -1
if item i of myLines contains mySpentMark then
tell myNote to delete paragraph i
end if
end repeat
end removeTotal
tell myNote to delete paragraph i

is the line that doesn't work. I get the message: "The note as text" doesn’t understand the delete message.

I tried quite a number of syntax variations, this one I took from a TextEdit example. The rich text class understands delete, is myNote not a rich text anymore? But it understands paragraphs !?

Here is the complete script:

http://pastebin.com/m55cd8e7c

Thanks for any hint!

Best,
Ganwell