Advertisement
timmy123456789

Untitled

Jan 25th, 2014
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. rednet.open('top')
  2. mon = peripheral.wrap('bottom')
  3. term.redirect(mon)
  4. print(" Light Control")
  5. print(" ")
  6. print(" ----------------")
  7. print(" | |")
  8. print(" | ON / Off |")
  9. print(" | |")
  10. print(" ----------------")
  11. term.restore()
  12. while true do
  13. event,side, X, Y = os.pullEvent("monitor_touch")
  14. if side == "bottom" and X <= 2 and X >= 17 and Y <= 3 and Y >= 7 then
  15. print("screen touched, button is CORE CHANGE")
  16. -- shell.run("")
  17. else
  18. print("what are you dong! Thats not a button!")
  19. end
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement