This is tested to work
out:Tstream=WriteStream("c:\result.txt") WriteLine(out,"hello") CloseStream(out) system_ ("notepad.exe c:\result.txt")