Advertisement
Guest User

test

a guest
Oct 20th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. m.clear()
  4.  
  5. function button1() button.toggleButton("1")
  6. print("Salut")
  7. sleep(1)
  8. button.toggleButton("1")
  9. end
  10.  
  11. function button2() button.toggleButton("2")
  12. print("bonjour")
  13. sleep(1)
  14. button.toggleButton("2")
  15. end
  16.  
  17. function ecran()
  18. button.setTable("1",button1,8,25,3,3)
  19. button.setTable("2",button2,12,25,6,6)
  20. button.screen()
  21. end
  22.  
  23. function getClick()
  24. event,side,x,y = os.pullEvent("monitor_touch")
  25. button.checkxy(x,y)
  26. end
  27.  
  28. ecran()
  29.  
  30. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement