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

"background Task"

Started by Mitchfizz05, 31 August 2013 - 12:43 AM
Mitchfizz05 #1
Posted 31 August 2013 - 02:43 AM
Hello.
I'm looking to make a program that runs in the background and still allows you to use the computer like normal.
How can I do this?

parallel.waitForAny(myFunction, ???)
Zudo #2
Posted 31 August 2013 - 02:54 AM
How about


function runShell()
 os.run({}, "shell")
end

function myProgram()
 os.run({["print"] = function() end, ["write"] = function() end}, "myProgram")
end

parallel.waitForAny(runShell, myProgram)
?