Advertisement
jonok333

I/O test

Dec 24th, 2023 (edited)
4
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local mon = peripheral.find("monitor")
  2. mon.clear()
  3. while true do
  4. mon.setCursorPos(3, 3)
  5. mon.write("I/O")
  6. event, side, x, y = os.pullEvent ("monitor_touch")
  7. if x > 2 and x < 6 and y == 3 then
  8. mon.setCursorPos(3, 5)
  9. mon.write("klik")
  10. end
  11. event, side, x1, y1 = os.pullEvent ("monitor_touch")
  12. if x1 > 2 and x1 < 6 and y1 == 3 then
  13. mon.clearLine()
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement