Hello all! This is my first ever, functional program that I have ever made. Therefore, I request y'all to a little easy on me please. Today, I present to you the:
Super Simple Redstone Outputter v0.2Alpha

What is it you ask? It is quite useful at times. This provides you with a console-like GUI that gives you text options and instructions to enable/disable redstone outputs to the left, right and back of the computer. Once you plug redstone to the right, left and back, you can use the simple on-screen steps to proceed.

The only goal of this program:
  • To be able to constantly have redstone signals enabled or disabled.
Without further ado, give it a try!

pastebin get Ctx8JbBz RSO

The code:

pastebin.com/Ctx8JbBz



-- Byte Industries Redstone Outputter by ByteZz v0.2A 3/11/2014 3:17 EST --
-- Changelog: --
-- Added infinite loop, bugs fixed and confirmed working --

detectOutputBack = function()
if rs.getInput("back") == true then
	    OutputBack = "ON"
else
	    OutputBack = "OFF"
end
end

detectOutputRight = function()
if rs.getInput("right") == true then
	    OutputRight = "ON"
else
	    OutputRight = "OFF"
end
end

detectOutputLeft = function()
if rs.getInput("left") == true then
	    OutputLeft = "ON"
else
	    OutputLeft = "OFF"
end
end

actionBack = function()
print("Currently Selected: Back")
print("Current State: "..OutputBack)
print("1. Set Output ON")
print("2. Set Output OFF")
actionBackResponse = read()
if actionBackResponse == "1" then
	    rs.setOutput("back", true)
	    print("Setting output back ON...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
else
	    rs.setOutput("back", false)
	    print("Setting output back OFF...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
end
end

actionRight = function()
print("Currently Selected: Right")
print("Current State: "..OutputRight)
print("1. Set Output ON")
print("2. Set Output OFF")
actionRightResponse = read()
if actionRightResponse == "1" then
	    rs.setOutput("right", true)
	    print("Setting output right ON...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
else
	    rs.setOutput("right", false)
	    print("Setting output right OFF...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
end
end

actionLeft = function()
print("Currently Selected: Left")
print("Current State: "..OutputLeft)
print("1. Set Output ON")
print("2. Set Output OFF")
actionLeftResponse = read()
if actionLeftResponse == "1" then
	    rs.setOutput("left", true)
	    print("Setting output left ON...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
else
	    rs.setOutput("left", false)
	    print("Setting output left OFF...")
	    sleep(1)
			    term.clear()
			    term.setCursorPos(1,1)
			    menuScreen()
end
end

menuScreen = function()
term.clear()
term.setCursorPos(1,1)
detectOutputBack()
detectOutputRight()
detectOutputLeft()

print("Byte Industries RSO v0.2ALPHA")
print("1. Redstone Output Back; Current State: "..OutputBack)
print("2. Redstone Output Right; Current State: "..OutputRight)
print("3. Redstone Output Left; Current State: "..OutputLeft)
print("Select your option (1-3)")

menuResponse = read()

if menuResponse == "1" then
	    term.clear()
			    term.setCursorPos(1,1)
			    actionBack()
elseif menuResponse == "2" then
	    term.clear()
			    term.setCursorPos(1,1)
			    actionRight()
else
	    term.clear()
			    term.setCursorPos(1,1)
			    actionLeft()
end

end




menuScreen()