Posted 08 August 2012 - 02:58 AM
So, before I get onto the code, I must say, I am currently, and for a while, away from a omputer, both irl and cc. I wrote this a second ago, while reading an issue in my email that users wanted to type the password for a lock on the same line as the prompt. Would the following do that?
I understand that it just prints depending on input, but will input still be on line 1?
print("Written in DroidEditor")
term.clear()
term.setCursorPos(1,1)
print("Password: ")
term.setCursorPos(1,12)
pw = read("*")
if pw ~= "computer" then
print("Incorrect Password")
sleep(1)
shell.run("startup")
else
print("Password accepted")
sleep(2)
os.reboot()
end
I understand that it just prints depending on input, but will input still be on line 1?