How to input text using script with script file?

I found about script today.

I refered to the help and I succeeded drawing circle.

But, I don't know how to input text using script.

I tried to find the document about the script, but I couldn't.

Please help me.