Saving clipboard to a file

Hello,

I've got a case where I'll (often) have some text copied from a document, that

I want to save just as a raw text file (in fact, as “foo.html”). Of course, TextEdit
will take the text and save it, but it insists on using RTF format (whatever the name of
the file). If I do it by hand, I can use the “Make Plain Text” menu command, but I see
no AppleScript command for this.

Any way to script this?  I can't seem to get the TextEdit "make" command to do anything

at all… I presume, perhaps, that I can tell it to make a Plain Text document. For that
matter, where can I find out WHAT IN THE WORLD TextEdit wants as arguments to its
AppleScript commands?

Thanks very much in advance,
--cls

Plain text?

set x to (the clipboard) as string
set y to open for access (choose file name) with write permission
write x to y
close access y

Thank you thank you thank you very much!