Process:write(data) method

Writes data in the standard input stream of the executed process.

Parameters

data

A string that will be written to the Process standard input stream.

Return value

Returns no value.

Example

local sysutils = require "sysutils" -- Spawn a cmd.exe process local p = sysutils.Process("cmd.exe", false, true) p:spawn() -- write to cmd process to execute the notepad.exe program p:write("notepad.exe\n") -- wait for notepad.exe to start before exiting sleep(5000)