Force TextEdit to hide ruler (and, if possible, restore old setting)?

I have a script that opens an RTF file in TextEdit to display information to the user while the script performs other commands. My script specifies the window size and position of this alert.

On systems in which TextEdit uses the default setting “show ruler”, the window size that I specify is too small to show the ruler and the text. I could expand the vertical size of the window to accommodate the ruler, but I would prefer to hide the ruler while displaying my RTF file.

I can’t find anything in TextEdit’s dictionary that would help me do this. Is there any other way of hiding the ruler via AppleScript? I would of course prefer to have a method that works while TextEdit is already open, if it is open when my script opens an RTF file, and I would like to be able to restore the existing setting after I hide the ruler.

I haven’t found any way to accomplish this, and will be grateful for any help.

You might want to know that in the current Lion Developer Preview TextEdit has a new tool bar / format bar that can’t be hidden.

Do you have to use rich text? You could just make a new plain text document.

Thank you. Your message gave me the answer I really needed - which is that I should use plain text messages. I have now replaced the RTF files with TXT files, and the result looks less elegant, but it performs exactly as I wanted to act. Thank you again!