This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PwnCC's profile picture

Return output over message

Started by PwnCC, 16 August 2017 - 11:29 AM
PwnCC #1
Posted 16 August 2017 - 01:29 PM
Hello! So im making a remote controller for ExtremeReactors.

local function update()
	while true do
		local event, senderId, msg, protocol = os.pullEvent("rednet_receive")
		shell.run(msg)
		rednet.broadcast()
	end
end

parallel.waitForAny(update, function() shell.run("shell") end)

This is my script so far.
Now i want it to broadcast the output of the command i sent the computer. How do i do so? I've been looking but i cant figure it out.
Thanks!
Edited on 17 August 2017 - 05:48 AM
Bomb Bloke #2
Posted 17 August 2017 - 07:55 AM
If you want to run a script "in the background" alongside shell, it's generally easier to just type "bg yourScript" straight into the commandline.

Sending the terminal output of a script to another system over rednet is a little more complex. A good start would be to read through this recent thread.
PwnCC #3
Posted 18 August 2017 - 07:05 PM
Okay thanks!