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

starting programs inside a program

Started by sleawnis, 24 November 2012 - 05:08 AM
sleawnis #1
Posted 24 November 2012 - 06:08 AM
ok i have my password door, and when i make a input, be right or wrong theres the 3 second sleep and then a quick flash of blank before is reboots. is there a way insted of os.reboot to make it run the startup so it dosent actualy restart the computer ?
Cranium #2
Posted 24 November 2012 - 06:17 AM
I believe this is actually intended behavior. It used to be that os.reboot() would be instant, but since a whole lot of computers doing that on a server can cause massive lag, it was slowed down intentionally. Currently, os.reboot() is the fastest way to restart your machine without causing possible recursion errors.
Kingdaro #3
Posted 24 November 2012 - 06:18 AM
For your situation, it'd probably be best to use a loop.


-- your os.pullEvent = os.pullEventRaw line goes here if you have one

while true do
  -- your password stuff
end
sleawnis #4
Posted 24 November 2012 - 06:26 AM
For your situation, it'd probably be best to use a loop.


-- your os.pullEvent = os.pullEventRaw line goes here if you have one

while true do
  -- your password stuff
end

exacly what i was looking for ;)/>/> thankyou
per56231 #5
Posted 25 November 2012 - 02:07 AM
You could try

shell.run("startup")
I think that'd work.