XOJO script writing a file

Is it possible to write a text file in Xojo Script?

No, XojoScript is sandboxed and cannot directly read/write to files. You can use the Context property to call methods on your own class that do file I/O, however.

Yes, but you will have to use the context object to do so. You cannot create a property of type TextoutputStream/BinaryStream in a Xojoscript, it must be handled internally by the context object.