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

To Do List/message Board

Started by Saxguy99, 25 August 2013 - 02:13 PM
Saxguy99 #1
Posted 25 August 2013 - 04:13 PM

term.setBackgroundColor(colors.orange)
function editList()
  term.setCursorPos(40,1)
  term.setTextColor(colors.white)
  term.setBackgroundColor(colors.blue)
  write(" Edit List ")
end
function monEditList()
  term.setCursorPos(40,1)
  term.setTextColor(colors.white)
  term.setBackgroundColor(colors.blue)
  write(" Edit List ")
end
function exitList()
  term.setCursorPos(1,19)
  term.setTextColor(colors.white)
  term.setBackgroundColor(colors.blue)
  write(" Exit List ")
end
function monExitList()
  term.setCursorPos(1,19)
  term.setTextColor(colors.white)
  term.setBackgroundColor(colors.blue)
  write(" Exit List ")
end
function desktop()
  term.setBackgroundColor(colors.orange)
  term.clear()
  term.setBackgroundColor(colors.orange)
  term.setTextColor(colors.black)
  term.setCursorPos(21,3)
  write("Todo List")
  term.setCursorPos(2,5)
  write("1: ")
  term.setCursorPos(2,7)
  write("2: ")
  term.setCursorPos(2,9)
  write("3: ")
  term.setCursorPos(2,11)
  write("4: ")
  term.setCursorPos(2,13)
  write("5: ")								  
  editList()
  exitList()
end
function desktop2()
  term.setBackgroundColor(colors.orange)
  term.clear()
  term.setTextColor(colors.black)
  term.setCursorPos(21,3)
  write("Todo List")
  term.setCursorPos(2,5)
  write("1: "..a)
  term.setCursorPos(2,7)
  write("2: "..B)/>/>
  term.setCursorPos(2,9)
  write("3: "..c)
  term.setCursorPos(2,11)
  write("4: "..d)
  term.setCursorPos(2,13)
  write("5: "..e)								  
  editList()
  exitList()
end
function monDesktop()
  mon = peripheral.wrap("left")
  mon.setBackgroundColor(colors.orange)
  mon.clear()
  mon.setTextColor(colors.black)
  mon.setCursorPos(21,3)
  mon.write("Todo List")
  mon.setCursorPos(2,5)
  mon.write("1: "..a)
  mon.setCursorPos(2,7)
  mon.write("2: "..B)/>/>
  mon.setCursorPos(2,9)
  mon.write("3: "..c)
  mon.setCursorPos(2,11)
  mon.write("4: "..d)
  mon.setCursorPos(2,13)
  mon.write("5: "..e)								  
  monEditList()
  monExitList()
end

desktop()
while true do
event,a1,a2,a3 = os.pullEvent("mouse_click")
  if a2>=40 and a2<=51 and a3 == 1 and a1 == 1 then
   term.clear()
term.setCursorPos(1,1)
write("steps")
term.setCursorPos(1,2)
write("1: When than # comes to the one you want to change type what u want that # to say on the list")
term.setCursorPos(1,4)
write("2: If u dont want to put any thing on that line then click Enter")
term.setCursorPos(1,6)
write("3: When done typing for that number click Enter")
term.setCursorPos(1,8)
write("This message will go away in 10 secs")
sleep(5)
for i = 1,10 do
  term.setCursorPos(1,9)
  print(i)
  i = i+1
  sleep(1)
end
term.clear()
term.setBackgroundColor(colors.blue)
term.setCursorPos(1,1)
write(" List Maker")
term.setCursorPos(1,3)
write("1: ")
a = read()
term.setCursorPos(1,5)
write("2: ")
b = read()
term.setCursorPos(1,7)
write("3: ")
c = read()
term.setCursorPos(1,9)
write("4: ")
d = read()
term.setCursorPos(1,11)
write("5: ")
e = read()
sleep(3)
term.clear()
term.setCursorPos(1,1)
for  i = 1,3 do
  write("SAVING DATA.")
  sleep(1)
  term.clear()
  term.setCursorPos(1,1)
  write("SAVING DATA..")
  sleep(1)
  term.clear()
  term.setCursorPos(1,1)
  write("SAVING DATA...")
  sleep(1)
  term.clear()
  term.setCursorPos(1,1)
end
desktop2()
monDesktop()
  elseif a2>=1 and a2<=11 and a3==19 then
	os.reboot()
  end
end

MAKE SURE THE MONITOR IS ON THE LEFT SIDE OF THE COMPUTER!!!
So go a head and improve it. And make sure to watch my YouTube vids at http://www.youtube.com/user/SAXGUY1999
H4X0RZ #2
Posted 25 August 2013 - 09:00 PM
Why the fake saving screen?
svdragster #3
Posted 26 August 2013 - 04:59 AM
With this you can get a monitor regardless on which side it is.

local monitor
for _,side in pairs(redstone.getSides()) do
  -- # check if it's a monitor
  if peripheral.getType(side) == "monitor" then
		-- # it is! wrap it and break out of the loop
		monitor=peripheral.wrap(side)
		break
  end
end
Saxguy99 #4
Posted 27 August 2013 - 12:59 PM
The fake loading screen cus its just for ascetics
TcG #5
Posted 27 August 2013 - 02:10 PM
pastebin would be useful.
masterdisasterHD #6
Posted 07 September 2013 - 03:18 PM
little tip for the saving part: textutils.slowWrite("SAVING DATA") textutils.slowPrint("…", 3)