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

How do i make an ordering window

Started by kingkingkingkg, 10 July 2012 - 12:49 PM
kingkingkingkg #1
Posted 10 July 2012 - 02:49 PM
Im making some shops and i wanna know how to program it so if someone types in an order it will run on screen
the orders wont be predefined they will very so i need like a form almost
like password input but it will print it on back screen
Can anyone help?
kingkingkingkg #2
Posted 10 July 2012 - 03:22 PM
Nvm i found out how
Drsirdeath #3
Posted 12 July 2012 - 12:46 AM
Care to share you'r method?
kingkingkingkg #4
Posted 20 July 2012 - 10:12 PM
Yes i can
Spoiler
print("Enter Text:")
text=read()
yourmonitor = peripheral.wrap(yourside)  -- Yourside is the side of your monitor
term.redirect(yourmonitor) -- Your code like print or term.write()
print(text)
term.restore()   -- Back to the main computer screen
print(text)

edit:messed up spoiler tag lol and fixed code
Edited on 20 July 2012 - 08:16 PM