Advertisement
kunyuu

CC ToDo List

Feb 14th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local y = 1
  2. local listNum = 1
  3. local uInput = ""
  4.  
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. write("To Do List, by JaviTech")
  8. y = y + 1
  9.  
  10. while true do
  11.     term.setCursorPos(1,y)
  12.     uInput = read()
  13.    
  14.     local tempX, tempY = term.getCursorPos()
  15.    
  16.     term.setCursorPos(tempX, tempY-1)
  17.     term.clearLine()
  18.  
  19.     write(listNum .. ". " .. uInput)
  20.     tempX, tempY = term.getCursorPos()
  21.    
  22.     y = tempY + 1
  23.     listNum = listNum + 1
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement