The short answer is "stick each entry in a table, draw it on the monitor, wait for user input".
The long answer is, how are you going to add entries via an external monitor? Do you have specific plans for text entry?
i have a system set up with a main computer running this As 'STARTUP':
--peripherals--
title = peripheral.wrap("monitor_2")
status = peripheral.wrap("monitor_3")
auto = peripheral.wrap("monitor_4")
gencell = peripheral.wrap("monitor_5")
advcell = peripheral.wrap("monitor_6")
react = peripheral.wrap("monitor_7")
energy = peripheral.wrap("monitor_8")
todo = peripheral.wrap("monitor_9")
deviders ={peripheral.wrap("monitor_10"), peripheral.wrap("monitor_11"), peripheral.wrap("monitor_12"), peripheral.wrap("monitor_13"), peripheral.wrap("monitor_14"), peripheral.wrap("monitor_15"), peripheral.wrap("monitor_16"), peripheral.wrap("monitor_17")}
wireless = peripheral.wrap("top")
--functions--
function resetAllDefaults()
titleInit()
reset(status, "-------CONNECTED DEVICES-------")
reset(auto, "-------AUTOCRAFTING STATUS-------")
reset(gencell, "-------GENERAL CELL INFO-------")
reset(advcell, "-------ADVANCED CELL INFO-------")
reset(react, "-------REACTOR INFO-------")
reset(energy, "-------ENERGY STORAGE INFO-------")
reset(todo, "-------TO DO-------")
end
local function centerText(screen, text)
local x, y = screen.getSize()
local x2, y2 = screen.getCursorPos()
screen.setBackgroundColor(colors.gray)
screen.setCursorPos((math.ceil(x / 2) - (text:len() / 2)), y2)
screen.write(text)
end
function reset(toReset, titleofscreen)
toReset.setBackgroundColor(colors.gray)
toReset.clear()
toReset.setBackgroundColor(colors.black)
toReset.setCursorPos(1,1)
toReset.setTextColor(colors.yellow)
centerText(toReset, titleofscreen)
toReset.setCursorPos(1,2)
end
function titleInit()
title.setBackgroundColor(colors.gray)
title.clear()
title.setCursorPos(1,1)
title.setTextScale(2.5)
title.setTextColor(colors.lightGray)
centerText(title, "Dust Labs' Wall Of Data")
title.setCursorPos(1,2)
centerText(title, "Powered By DustOS")
end
function writeToAllDevs(text)
end
function InitWireless()
if wireless.isWireless() then
rednet.open("top")
end
end
function checkRemote()
local file = fs.open("rednet", "r")
message = file.readLine()
file.close()
resetRednet()
if message ~= "nil" then
if message == "reboot" then
os.reboot()
elseif message == "restart" then
os.reboot()
elseif message == "ping" then
rednet.broadcast("pong")
end
end
end
function resetRednet()
local clear = "nil"
local file2 = fs.open("rednet", "w")
file2.write(clear)
file2.close()
end
function tellRemote(message)
rednet.broadcast(message)
end
--statics--
--variables--
--MAIN--
rem = multishell.launch({}, "remote")
multishell.setTitle(rem, "Remote Manager/LOG")
multishell.setTitle(multishell.getCurrent(), "MAIN")
InitWireless()
resetAllDefaults()
deviders[1].write("devidr")
loop = 0
while true do
loop = loop + 1
if loop > 10 then
loop = 0
end
--tick(check for data)--
checkRemote()
if loop == 9 then
-- multishell.launch({}, "todo")
end
--render(draw to screen)--
--set vars--
--sleep--
sleep(.1)
--end--
end
And This As 'REMOTE':
while true do
ID, message = rednet.receive()
print(message)
file = fs.open("rednet", "w")
file.write(message)
file.close()
end
And A Pocket Computer Running This as 'STARTUP':
function init()
rednet.open("back")
term.setCursorPos(1,1)
term.setBackgroundColor(colors.gray)
term.clear()
term.setTextColor(colors.yellow)
print("Dust Wall Of Data Remote")
term.setTextColor(colors.lightGray)
term.setCursorBlink(true)
x = 1
y = 2
end
function enter()
if y > 19 then
y = y
else
y = y + 1
end
term.setCursorPos(x,y)
end
--MAIN
init()
while true do
term.write(">")
inp = read()
enter()
if inp == "end" then
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.yellow)
print("Dust OS Program Launcher")
break
elseif inp == "clear" then
init()
elseif inp == "ping" then
rednet.broadcast("ping")
start = os.clock()
PID, pong = rednet.receive(5)
elapsed = os.clock() - start
if pong ~= nil then
print("Computer #" .. PID .. " Sent:" .. pong)
enter()
print("After " .. elapsed .. " seconds")
enter()
else
print("TIMED OUT AFTER " .. elapsed .. " Seconds")
enter()
end
elseif inp == "help" then
print("-------Help-------")
enter()
print("Serverhelp - Server Side")
enter()
print("Clienthelp - Client Side")
enter()
elseif inp == "serverhelp" then
print("-------Server Help-------")
enter()
elseif inp == "clienthelp" then
print("-------Client Help-------")
enter()
elseif inp == "options" then
print("-------Options-------")
enter()
elseif inp == "todo" then
print("-------TODO-------")
enter()
print("To Edit Todo Use The Edit")
enter()
print("Computers")
else
rednet.broadcast(inp)
end
end
the system is set up so the main program receives messages sent from the pocket computer. i want the player to be able to type in "todo" and it will open a TODO tab whitch they will be able to input "add <message>" "remove <#>" or "Move <#> <#>"
If You Need Any More Info Just Ask