Help with AppleWorks (Page Break)

This may be a simple question, but I couldn’t find the answer here, at Apple, or online.

I’m still working with some simple scripts to make AppleWorks a little more functional for me. One thing I miss from the old Mac version of WordPerfect is the ability to append to the clipboard, so I wrote a simple script to do that:

tell application "AppleWorks 6"
	set mytxt to (the clipboard) & the selection
	set the clipboard to mytxt
end tell

This does what WordPerfect used to do, but it would be much more functional for my purposes, if I could add a page break between each selection I’ve appended to the clipboard. I see that there are special characters for tab and return, and have modified the second line of the script to add two hard returns between selections

tell application "AppleWorks 6"
	set mytxt to (the clipboard) & "\r\r" & the selection
	set the clipboard to mytxt
end tell

This makes it easier to manually insert page breaks between selections when I paste into a new file (the goal of the modified script is to select addresses from a file of letters–then open an envelope template file and paste in the addresses, so I’d rather not manually put in page breaks).

I tried using (ASCII character (12)), but that seems to give me a space, not an end of form character. Or maybe it inserted an ‘l’ and I didn’t notice. The grep charcode \f didn’t work either.

Does anyone know how to insert a page break in a string? Is there a resource I’m missing for working with text in AppleScript?


Gee… You’d think there’d be an easy way to do that. I don’t see anything in the dictionary, though. Hopefully someone will know the answer.

If you copy some text with a page break and look at it in a text editor, do you see anything useful?

A really bad workaround in the mean time might be to put the highlighted selection into a var, open a new doc, paste in the clipboard, insert the document with the Page Break, then paste in the selection from the main doc. Then select the whole think and put it in the clipboard and close the temp document.

Pretty lame solution…