Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. s = peripheral.wrap("top")
  2. s.clear()
  3.  
  4. s.setCursorPos(1,1)
  5. s.setBackgroundColor(colors.blue)
  6. s.write("Odchod")
  7.  
  8. function odchod(ox,oy)
  9. if oy==10 and ( ox > 9 and ox < 18) then
  10. print("klik na odchod")
  11. s.setCursorPos(1,1)
  12. s.setBackgroundColor(colors.green)
  13. s.write("Odchod")
  14. rs.setOutput("bottom", true)
  15. sleep(13)
  16. rs.setOutput("bottom", false)
  17. s.setCursorPos(1,1)
  18. s.setBackgroundColor(colors.blue)
  19. s.write("Odchod")
  20. end
  21. end
  22.  
  23. while true do
  24. local e,s,x,y = os.pullEvent("monitor_touch")
  25. odchod(x,y)
  26. print(x..":"..y)
  27. sleep(0.1)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement