3 posts
Posted 23 November 2014 - 05:25 PM
I want to make a start up script that activates other scripts. What do I need to do. I tried Shell.run but that doesnt work either.
8543 posts
Posted 23 November 2014 - 09:06 PM
Please post the code you tried using and any error messages you got while using it.
3 posts
Posted 24 November 2014 - 04:51 AM
print(“Reactor B Status Program Active”) while true do
local reactor1 = peripheral.wrap("BigReactors-Reactor_4")
local mon = peripheral.wrap("monitor_5")
mon.clear()
– Begin Reactor 1
–mon.setCursorPos(1,1)
–mon.setTextColor(colors.white)
–mon.write("Reactor #: ")
–mon.setTextColor(colors.lime)
–mon.write("1")
mon.setCursorPos(1,1)
mon.setTextColor(colors.white)
mon.write("Reactor: ")
mon.setTextColor(colors.lime)
mon.write(“B”)
mon.setCursorPos(1,2)
mon.setTextColor(colors.white)
mon.write("Active: ")
mon.setTextColor(colors.lime)
mon.write(reactor1.getActive())
mon.setCursorPos(1,3)
mon.setTextColor(colors.white)
mon.write("RF/T: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getEnergyProducedLastTick()))
mon.setCursorPos(1,4)
mon.setTextColor(colors.white)
mon.write("RF Stored: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getEnergyStored()))
mon.setCursorPos(1,5)
mon.setTextColor(colors.white)
mon.write("Casing Heat: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getCasingTemperature()))
mon.setCursorPos(1,6)
mon.setTextColor(colors.white)
mon.write("Fuel Heat: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getFuelTemperature()))
– End Reactor 1
sleep(5)
end
print(“Reactor A Status Program Active”) while true do
local reactor1 = peripheral.wrap("BigReactors-Reactor_5")
local mon = peripheral.wrap("monitor_4")
mon.clear()
– Begin Reactor 1
–mon.setCursorPos(1,1)
–mon.setTextColor(colors.white)
–mon.write("Reactor #: ")
–mon.setTextColor(colors.lime)
–mon.write("1")
mon.setCursorPos(1,1)
mon.setTextColor(colors.white)
mon.write("Reactor: ")
mon.setTextColor(colors.lime)
mon.write(“A”)
mon.setCursorPos(1,2)
mon.setTextColor(colors.white)
mon.write("Active: ")
mon.setTextColor(colors.lime)
mon.write(reactor1.getActive())
mon.setCursorPos(1,3) mon.setTextColor(colors.white)
mon.write("RF/T: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getEnergyProducedLastTick()))
mon.setCursorPos(1,4)
mon.setTextColor(colors.white)
mon.write("RF Stored: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getEnergyStored()))
mon.setCursorPos(1,5)
mon.setTextColor(colors.white)
mon.write("Casing Heat: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getCasingTemperature()))
mon.setCursorPos(1,6)
mon.setTextColor(colors.white)
mon.write("Fuel Heat: ")
mon.setTextColor(colors.lime)
mon.write(math.floor(reactor1.getFuelTemperature()))
– End Reactor 1
sleep(1)
end
print(“Management B Program Active”)while true do local reactor = peripheral.wrap(“BigReactors-Reactor_4”) local low = 100000 local high = 5000000if reactor.getEnergyStored() <=low thenreactor.setAllControlRodLevels(0)endif reactor.getEnergyStored() >=high thenreactor.setAllControlRodLevels(100)endsleep(2)endnot my scripts. all of them are different ones. but i want to run them all at once. and I get no errors its just that doing:
shell.run("ManageA")
shell.run("ManageB")
shell.run("ReactorA")
shell.run("ReactorB")
only does one at a time. it only starts managea. when i term that then it starts manage b.
7083 posts
Location
Tasmania (AU)
Posted 24 November 2014 - 05:10 AM
Generally, yeah, only one script runs at a time.
If you're on CC 1.6 (or later), you could try
multishell - just build an advanced computer and try shell.openTab() instead of shell.run().
3 posts
Posted 24 November 2014 - 07:02 AM
So I would do
shell.openTab("ManageA")
shell.openTab("ManageB")
etc.?
7083 posts
Location
Tasmania (AU)
Posted 24 November 2014 - 07:38 AM
That's the idea.