Posted 25 May 2014 - 05:16 PM
Hello, after extensive searching I found more programs then I care to count for lock doors and some questions as mine is about the log in. I think I have a very simple solution but don't know the command to make a program start another from a then statement.
Ok so first thought is simply moving/renaming the start-up file into the programs folder to be called later by the correct password at log in. Then editing any of the password door programs to navigate to and run the renamed original start-up file now called "NormalRunning" or whatever you prefer. The editing would be simple minus the fact that I don't know the syntax to navigate to and run a program (In my case "NormalRunning").
Just replace
Ok so first thought is simply moving/renaming the start-up file into the programs folder to be called later by the correct password at log in. Then editing any of the password door programs to navigate to and run the renamed original start-up file now called "NormalRunning" or whatever you prefer. The editing would be simple minus the fact that I don't know the syntax to navigate to and run a program (In my case "NormalRunning").
Just replace
if input == "password" then
redstone.setOutput("back", true)
sleep(2)
redstone.setOutput("back", false)
end
with
os.pullEvent = os.pullEventRaw --Lock the program
local password = "password" --Password to start computer
while true do
term.clear() --Clears the screen
term.setCursorPos(1, 1) --Set cursor back to start
write("Good morning.") --Print on screen
local input = read(*) --Hidden user entry
if input == password then
term.clear() --Clears the screen
term.setCursorPos(1, 1) --Set cursor back to start
print("Nice to see you back.") --Print on screen
run NormalRunning --NEED HELP
else
term.clear() --Clears the screen
term.setCursorPos(1, 1) --Set cursor back to start
print("Thanks for visiting 'My Shop' but we're closed.") --Print on screen
print("Beat the heat in our pool while you wait.") --Print on screen
end
end
If this is even possiable might someone be able to help me with the –NEED HELP line in the replacement code. As you can see it's going to be running a shop. Next would be two dir for opened and closed in the programs folder with files to work the doors, make lights fancy, and work display screens.