This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CreeperWiz's profile picture

Input

Started by CreeperWiz, 22 February 2015 - 01:59 AM
CreeperWiz #1
Posted 22 February 2015 - 02:59 AM
How do I recive input from a keyboard. For example I want to make a program with a guy to change labels.
Dog #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…

term.write("Enter new label: ")
local newLabel = read()
if newLabel then os.setComputerLabel(newLabel) end
Edited on 22 February 2015 - 03:27 AM
CreeperWiz #3
Posted 22 February 2015 - 09:55 PM
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…

term.write("Enter new label: ")
local newLabel = read()
if newLabel then os.setComputerLabel(newLabel) end
Ik i can use the label change thing. It was a example. Also Thank you a lot :)/> !