Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open('top')
- mon = peripheral.wrap('bottom')
- term.redirect(mon)
- print(" Light Control")
- print(" ")
- print(" ----------------")
- print(" | |")
- print(" | ON / Off |")
- print(" | |")
- print(" ----------------")
- term.restore()
- while true do
- event,side, X, Y = os.pullEvent("monitor_touch")
- if side == "bottom" and X <= 2 and X >= 17 and Y <= 3 and Y >= 7 then
- print("screen touched, button is CORE CHANGE")
- -- shell.run("")
- else
- print("what are you dong! Thats not a button!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement