basic ID question: converting the contents of a text frame to a table

I’m sure it’s easy, but I can’t get figure it out: how do you convert the contents of a selected text frame into a table? Remember, this is the selected text frame itself. I can’t quite get the script to select all of its text contents to perform the conversion.

‘text frame’ is not a vanilla AppleScript term, so you must be referring to an application dictionary.

What version of InDesign are you using?

Yes I’m talking about the application dictionary and I’m using the latest version, InDesign CS2.

To be even more exact: I’d like to import text from a file into a text frame, then convert it all into a table. It’s hard to believe that there’s not some simple command for just selecting the entire text contents of a text frame then applying something like “convert to table” to it.