Hey!
You'll want to use the "touchpoint API"! —
http://www.computerc...touchpoint-api/ This one.
Get into your computer and type: pastebin get pFHeia96 touchpoint — This will download the touchpoint API
now go into your program ( edit PROGRAMNAME // mostlikely "edit startup" )
Now heres some code that should do the trick:
os.loadAPI("touchpoint")
local t = touchpoint.new("top") -- Change it to your monitor side!
-- Your buttons!!
t:add("button1", nil, 2, 2, 10, 4, colors.red, colors.lime)
t:add("button2", nil, 2, 6, 10, 8, colors.red, colors.lime)
-- "button1/2" are the button names. Nil are the functions and the numbers are
-- the coordinates for your buttons. First color is the "Offline color" and the second one the
-- "Online color"
t:draw() -- This will draw the buttons on to your monitor
while true do -- Heres where the magic happens.
local event, button = t:handleEvents(os.pullEvent())
if event == "button_click" then
if button == "button1" then -- Tells what to do if you press the "button1" on your monitor
print("button1 was pressed")
t;toggleButton("button1")
elseif button == "button2" then -- Tells what to do if you press the "button2" on your monitor
print("button2 was pressed")
t:toggleButton("button2")
end
end
end
To change redstone states:
rs.setOutput("SIDE", true/false)
for example: If you want to set the Redstone output on the right to 1 / On / true write:
rs.setOutput("right", true)
.. Oh if you would want to use bundled cable those work like this:
rs.setBundledOutput("SIDE", colors.COLOR)
- for example we want white to be on on the right side:
rs.setBundledOutput("right", colors.white)
Just tell me what you want exactly and I will write it for you as good as I can.
And yes my english is terrible but I hope I could help you somehow:p
have a nice day