Posted 11 April 2012 - 12:20 PM
This is the read() but edited slightly.
Both of the read() now no longer replace the whole line on the screen.
So you can type in the middle of your sentance without destroying it! (Doesnt replace typed chars as I have no way to know what you overridden)
Added = read() readLimit()
read() is simply not replacing the whole string
readLimit(number) means the user can only input this many letters/numbers etc. As well as doesnt replace the whole string.
while true do
print("Write the 5 digit password to enter")
if string.len(API.readLimit(4)) == 5 then
opendoor()
sleep(5)
shell.run("clear")
end
end
Or maybe you want to limit names people choose? Or passwords?
Anyways. read() is good for typing into that fancy screen of yours without making it look terrible after the first keystroke.
http://pastebin.com/j988HWEG
Both of the read() now no longer replace the whole line on the screen.
So you can type in the middle of your sentance without destroying it! (Doesnt replace typed chars as I have no way to know what you overridden)
Added = read() readLimit()
read() is simply not replacing the whole string
readLimit(number) means the user can only input this many letters/numbers etc. As well as doesnt replace the whole string.
while true do
print("Write the 5 digit password to enter")
if string.len(API.readLimit(4)) == 5 then
opendoor()
sleep(5)
shell.run("clear")
end
end
Or maybe you want to limit names people choose? Or passwords?
Anyways. read() is good for typing into that fancy screen of yours without making it look terrible after the first keystroke.
http://pastebin.com/j988HWEG