I need help making a code.
I'm trying to make like a to do board, and was wondering how to enter a task, and it would magicly pop it up on the monitor.
Please help.
P.S. the server i'm playing on is abit glitchy.
7 replies to this topic
#1
Posted 10 October 2012 - 04:02 AM
#3
Posted 10 October 2012 - 04:39 AM
mon = peripheral.wrap("left")
mon.write("stuff")
My code hope it helps.
#4
Posted 10 October 2012 - 07:24 AM
Little demo code for you, uses two files. One of which, you simply type your todo list into.
The other, you run when you want to print the todo list. Simple to setup so it prints to a monitor.
Create a file called something like "todolist". This can be whatever you want it to be really, just remember it.
(This file will contain your list.)
Now create a file called something like "todo". Again, this can be whatever you want, but todo makes sense.
Now inside "todo", type this.
Also, this is the incorrect section for this thread.
It belongs here.
The other, you run when you want to print the todo list. Simple to setup so it prints to a monitor.
Create a file called something like "todolist". This can be whatever you want it to be really, just remember it.
(This file will contain your list.)
Now create a file called something like "todo". Again, this can be whatever you want, but todo makes sense.
Now inside "todo", type this.
file = fs.open("todolist", "r") -- todolist is whatever you named the other file.
local list = {}
local line = file.readLine()
repeat
table.insert(list, line)
line = file.readLine()
until line == nil
file.close()
for i, v in pairs(list) do
textutils.slowPrint(v)
sleep(0.5)
end
Also, this is the incorrect section for this thread.
It belongs here.
#5
Posted 10 October 2012 - 09:26 PM
Do I write exactly that? Or do I write something different in the (list) and (line) parts?
Thanks
Thanks
#6
Posted 14 October 2012 - 06:28 AM
spaites, on 10 October 2012 - 09:26 PM, said:
Do I write exactly that? Or do I write something different in the (list) and (line) parts?
Thanks
Thanks
Just make a file called "todolist" and type in your list of things to do.
Each line being one thing todo.
Then make a new file called "todo" and put that exact code into it.
#7
Posted 16 October 2012 - 04:49 AM
I've done that, and it didn't work.
I'll try it again.
I'll try it again.
#8
Posted 16 October 2012 - 05:22 PM
Ain't this in the wrong section?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











