This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Rabid_Robot's profile picture

Bundled cable cancelation

Started by Rabid_Robot, 03 September 2012 - 02:30 AM
Rabid_Robot #1
Posted 03 September 2012 - 04:30 AM
ok, so this has been annoying me for awhile.
here's my code, constructive criticism will help as well




shell.run("clear")
print("opening default interface")
sleep(1)
shell.run("clear")
print("select a command to activate")
(1)
print("command 1")
print("command 2")
print("command 3")
print("all")

input = read()

command 1 = ("c1")
command 2 = ("c2")
command 3 = ("c3")
all = ("a")

if input == "command 1" then
shell.run("clear")
print("Command 1")
print("what would you like to do")
print("start")
print("stop")

input = read()

start = "1s1"
stop = "1s2"

if input == "1s1" then
shell.run("clear")
textutils.slowPrint("Activating Command 1")
rs.setBundledOutput("back", colors.white")
sleep(1)
print("Command 1 Activated")
shell.run("clear")
end

if input == "1s2" then
shell.run("clear")
print("Command 1 Deactivated")
<———————————what do i put here to stop the bundled output above?
shell.run("clear")
end
end
KaoS #2
Posted 03 September 2012 - 05:01 AM
rs.setBundledOutput('back',0)

and line 6, why do you have'(1)'
Kazimir #3
Posted 03 September 2012 - 05:12 AM

term.clear()
print("opening default interface")
sleep(1)
term.clear()
print("select a command to activate")
sleep(1)
print("1 - c1n2 - c2n3 - c3nall - 'a'")
input = read()

  if input == "c1" then
	term.clear()
	print(input)
	print("what would you like to donstartnstop")
  end

input2 = read()

  if input2 == "start" then
	term.clear()
	textutils.slowPrint("Activating Command 1")
	rs.setBundledOutput("back", 1)
	sleep(1)
	print(input.." Activated")
	term.clear()
  elseif input2 == "stop" then
	term.clear()
	print(input.."Deactivated")
	rs.setBundledOutput("back", 0)
	term.clear()
  end