How do I recive input from a keyboard. For example I want to make a program with a guy to change labels.
Input
Started by CreeperWiz, Feb 22 2015 02:59 AM
2 replies to this topic
#1
Posted 22 February 2015 - 02:59 AM
#2
Posted 22 February 2015 - 04:25 AM
To get input from the user via keyboard, you would use read. To change the computer label you'd use the OS API.
For example...
For example...
term.write("Enter new label: ")
local newLabel = read()
if newLabel then os.setComputerLabel(newLabel) end
Edited by Dog, 22 February 2015 - 04:27 AM.
#3
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users












