Hiranus

bee sth

Sep 29th, 2014
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. os.loadAPI("button")
  2. button.prepareMonitor()
  3. button.setSleep(0)
  4.  
  5. button.setBasicButtonVar(7,5,1)
  6.  
  7.  
  8. local isAuto=true
  9. function beeAuto ()
  10. if isAuto == false then
  11. isAuto=true
  12. button.selectGroup("B")
  13. rs.setOutput("left",true)
  14. rs.setOutput("right",false)
  15. else
  16. isAuto=false
  17. button.selectGroup("A")
  18. rs.setOutput("left",false)
  19. rs.setOutput("right",true)
  20. end
  21. button.redrawScreen()
  22.  
  23. end
  24. beeAuto()
  25. button.selectGroup("A")
  26. button.addBasicButton("Au OFF",beeAuto,button.flash)
  27. button.selectGroup("B")
  28. button.addBasicButton("Au ON",beeAuto,button.flash,colors.lime,colors.blue)
  29. button.selectGroup("A")
  30. button.calculateButtons()
  31.  
  32. button.redrawScreen()
  33. while true do
  34. button.getClick()
  35. end
Advertisement
Add Comment
Please, Sign In to add comment