View Single Post
I found the error by myself. The set-command somehow converted the note. I passed the container of the note to the event and it works:

Code:
	on removeTotal(myContainer)
		set myLines to paragraphs of note of myContainer
		set myCount to count of myLines
		
		repeat with i from myCount to 1 by -1
			if item i of myLines contains mySpentMark then
				tell note of myContainer to delete paragraph i
			end if
		end repeat
	end removeTotal
Best,
Ganwell