Posted 06 March 2016 - 04:46 PM
So I have two programs, program a and program b. program a is ran first and then a starts b…
Is there a way for program a to pause the execution of program b without tampering with program b's code
for example:
Program a
--load program b into a
f = fs.open("program b", 'r')
b = loadstring(f.readAll())
f.close()
setfenv(b, getfenv())
b()
program b
i = 1
while true do
print(i)
i = i + 1
end
Is there a way for program a to pause the execution of program b without tampering with program b's code
for example:
desired outcome
b: 1
b: 2
b: 3
b: 4
a: button pressed, pausing execution of program b
a: button pressed again, resuming program b
b: 5
b: 6
...