When I want to edit my to do list I need to edit the program and then reboot, I made the to do list I an just looking for a separate program that will ask questions like what line and then you can edit the line then when you are done it will automatically reboot.
user friendly to do list
Started by Beaus1966, Jun 27 2013 04:13 PM
12 replies to this topic
#1
Posted 27 June 2013 - 04:13 PM
#2
Posted 27 June 2013 - 08:52 PM
Split into new topic.
Please post your existing code and any error messages you receive while running it.
Please post your existing code and any error messages you receive while running it.
#3
Posted 28 June 2013 - 01:59 AM
I was bored, and feeling kind. If you wanted to save the to-do list in a file try something like this:
You might get bad responses if you ask for people to make you programs in this forum.
if not fs.exists("todo") then
handle = fs.open("todo", "w")
handle.writeLine("{}")
handle.close()
end
handle = fs.open("todo", "r")
todo = textutils.unserialize(handle.readLine())
handle.close()
term.clear()
term.setCursorPos(1,1)
print("To-do list")
print("Please enter the item number in the to-do list")
n = tonumber(read())
if type(n) == "nil" then term.clear() term.setCursorPos(1,1) error("That was not a number", 0) end
term.clear()
term.setCursorPos(1,1)
if not todo[n] then
print("Current value: nil" )
print("Please enter the new value")
new = read()
todo[n] = new
else
print("Current value: " .. todo[n] )
print("Please enter the new value")
new = read()
todo[n] = new
end
handle = fs.open("todo", "w")
handle.writeLine(textutils.serialize(todo))
handle.close()
You might get bad responses if you ask for people to make you programs in this forum.
#4
Posted 28 June 2013 - 07:42 AM
Thanks, ZodoHackz I will try that, is that everything or just the editor?
#5
Posted 28 June 2013 - 07:44 AM
No error messages, paste bin code will be posted shortly
Code is: KeQMhB6M
Code is: KeQMhB6M
#6
Posted 28 June 2013 - 08:15 AM
ZodoHackz i get an error message, attempt to concatenate string and nil
#8
Posted 28 June 2013 - 04:39 PM
You edited the code a couple posts above? And what do I name the programs(s)?
#9
Posted 28 June 2013 - 04:48 PM
How about 'ToDo'?
#10
Posted 28 June 2013 - 08:41 PM
Sorry but is that the displayer to the monitor and the editor. Or is it just the editor????
Thanks for your time
Thanks for your time
#11
Posted 28 June 2013 - 11:51 PM
You might want to have a look at my Todo program then, it has a simple editor that could get you started.
pastebin.com/vFaHf7K
pastebin.com/vFaHf7K
#12
Posted 29 June 2013 - 08:57 AM
Thanks I will check it out!
Did you enter the code wrong???
Did you enter the code wrong???
#13
Posted 29 June 2013 - 10:29 AM
i read up on lua and made one!!!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












