Help with line breaks with Notes.app

I’m trying to create a script that creates new notes in Mountain Lion’s Notes.app where it will show the name of the note in the note body then a blank line, then the main body text. I’ve tried a few things but here’s the script:

tell application "Notes"
	tell account "iCloud"
		tell folder "Notes"
			make new note with properties {name:noteName, body:noteName & return & return & noteText}
		end tell
	end tell
end tell

So in the main note it should be as follows:

[i]Note Title

Blah, blah, blah,
Blah, blah, blah…[/i]

Instead of:

Note Title
Blah, blah, blah,
Blah, blah, blah…

Adding “& return” doesn’t work for me. Any idea on how I could achieve this?

Hello

Try to insert a space character between the two return characters.
I guess that the application don’t like consecutives line break.

Maybe it behave a different way if you replace the statement
body:noteName & return & return & noteText
by
body:noteName & linefeed & linefeed & noteText

Yvan KOENIG (VALLAURIS, France) dimanche 16 septembre 2012 22:30:51

Thanks, I’ve tried that along with a few more things, but it still won’t work.

It looks like the content is html, so try using
for a line break.

That’s it! I never thought of that, thanks :smiley: