console.stdin read/write property
The console.stdin property gets the current standard console input File.
Example
local console = require "console"
-- create a file containing the unicode string "Hello World !"
local f = sys.File("hello.txt"):open("write", "unicode")
f:writeln("Hello World")
f:close()
console.stdin = f:open()
console.writeln("Hey, do you have anything to say ?")
local msg = console.readln()
--outputs "Ok, you said 'Hello World' !!!" without using your keyboard :)
console.writecolor("brown", "Ok, you said '"..msg.."' !!!\n")
-- closes "hello.txt" and revert back to standard console.stdin
console.stdin:close()