Posted 27 June 2015 - 08:21 PM
Ok, So Im Attempting To Make A "Wilson Bot". Just Something That Lets You Have A Few Quick Programs, Like Chat Or Reboot, At The Press Of A Key .
Example:
local ev, param1, param2 = os.pullEvent()
if param1 == 18 then –e Key
print("Exiting Wilson Program . . .")
sleep(0.5)
shell.run("clear")
elseif param1 == 25 then –p Key
term.write("Program: ")
input = read()
shell.run(input)
else
print("Unrecognized Command. Hit 'h' If You Need Help")
end
Its Working Great So Far, However If You Press p It Will Execute The term.write() But Will Keep The p Key On Screen.
For Example It Will Print This:
Program: p
Anyone Know How To Delete That p Without The Entire Screen Being Cleared?
Example:
local ev, param1, param2 = os.pullEvent()
if param1 == 18 then –e Key
print("Exiting Wilson Program . . .")
sleep(0.5)
shell.run("clear")
elseif param1 == 25 then –p Key
term.write("Program: ")
input = read()
shell.run(input)
else
print("Unrecognized Command. Hit 'h' If You Need Help")
end
Its Working Great So Far, However If You Press p It Will Execute The term.write() But Will Keep The p Key On Screen.
For Example It Will Print This:
Program: p
Anyone Know How To Delete That p Without The Entire Screen Being Cleared?