Posted 01 October 2014 - 07:11 AM
Hi there
Sorry if this has been asked but everything I have looked at so far is too confusing to me and I cant get it to work.
I Have a startup program that I want to run and at the same time I want it to output time to a monitor on the right.
Here's my failing code so far
Sorry if this has been asked but everything I have looked at so far is too confusing to me and I cant get it to work.
I Have a startup program that I want to run and at the same time I want it to output time to a monitor on the right.
Here's my failing code so far
os.pullEvent = os.pullEventRaw
os.loadAPI("rom/apis/peripheral")
while true do
parallel.waitForAny(Time(), startup() shell.run("shell") end)
end
os.loadAPI("rom/apis/shell")
os.loadAPI("rom/apis/os")
term.clear()
term.setCursorPos(1,1)
print("Sean's PC enter password to get to main menu")
sleep(15)
input = read("*")
if input == "password" then --quoted out as its my computer on my online private server
shell.run("Mainmenu")
else
write("Wrong Password ")
sleep(5)
term.clear()
sleep(5)
write("Restarting ")
sleep(5)
os.reboot()
end
if input == " " then
write("I don't get what you want ")
os.reboot()
end