need help on numbering lines in textedit

hello forum
i simply want to number every paragraph of a text file

for example i have :
" abab

i want

i know its seems easy but im stuck with that :

set the_file to (((path to desktop) as string) & "mytext.txt") as file specification
set all_lines to paragraphs of (read the_file)
set the_count to ((count of all_lines))

repeat with i from 1 to the_count
	if i > 9 then
		set the_para to ((i as string) & "-")
		set the_para to ("0" & (i as string) & "-")
	end if
	set paragraph i to ((the_para & "paragraph i") as string)


Your subject line is misleading because your net using TextEdit. The key is that you need to replace the item in the list with the combined number and paragraph. Try this:


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

thanks jon

You’re welcome, and, for clarification, in my post above, that should be “not using…” not “net using…” I really shouldn’t post in the middle of a migraine.