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

To-Do List Program

Started by anthonysteck, 14 June 2013 - 03:00 AM
anthonysteck #1
Posted 14 June 2013 - 05:00 AM
If someone could make me my "dream program" that would be great.
INFO:
I need a to-do list program now i can just make my own where it displays stuff but i want multi pages.The monitor size i want is a 2 x 4 monitors. Here is an example(see pic)
What i was just a page button where i can right click it and it would go to the next page then at the end it would go back to the beginning. so there would be 24 on a page and maybe if possible unlimited pages ? if anyone could help me thanks and if u need anymore info just tell me. Thanks again!


-Anthony
LBPHacker #2
Posted 14 June 2013 - 06:49 AM
And now the suggestion, please.
theoriginalbit #3
Posted 14 June 2013 - 06:52 AM
And now the suggestion, please.
Its not a suggestion, it is a program request… once again the lack of a better description for this subforum has hit, I still think it should be "Post your suggestions for the ComputerCraft mod here."

I've reported this to be moved to General, when a moderator gets around to doing it.
anthonysteck #4
Posted 14 June 2013 - 06:59 AM
Sorry I didnt know I thought this is where it goes. Whoops!
ChunLing #5
Posted 14 June 2013 - 08:48 AM
The read first and rules post could be a bit more descriptive. But the Suggestions Not to Make (read this first) post is very clear. I think that it also strikes the right balance of openness and intimidation.
Mackan90096 #6
Posted 14 June 2013 - 04:12 PM
I could make a try on it tomorrow.

It's very late here in Sweden, and I'm about to go to bed.
anthonysteck #7
Posted 14 June 2013 - 05:10 PM
I could make a try on it tomorrow.

It's very late here in Sweden, and I'm about to go to bed.
Thxs man!! :D/> :D/>
anthonysteck #8
Posted 15 June 2013 - 01:34 AM
BUMP
theoriginalbit #9
Posted 15 June 2013 - 01:38 AM
BUMP
Nope. Read this as to why.
Tjakka5 #10
Posted 15 June 2013 - 03:33 AM
I'll give it a try, I'll give a progress report in 30-40 minutes.
anthonysteck #11
Posted 15 June 2013 - 03:41 AM
I'll give it a try, I'll give a progress report in 20-30 minutes.
ok
Tjakka5 #12
Posted 15 June 2013 - 04:11 AM
Things are going well, most of the things are working now.
I just got to do a few more things, and make a way to import 'todo's' and then it should be about done.
anthonysteck #13
Posted 15 June 2013 - 04:19 AM
Things are going well, most of the things are working now.
I just got to do a few more things, and make a way to import 'todo's' and then it should be about done.
ok can u also make it so it will have an ajustible monitor size?
Tjakka5 #14
Posted 15 June 2013 - 04:31 AM
Things are going well, most of the things are working now.
I just got to do a few more things, and make a way to import 'todo's' and then it should be about done.
ok can u also make it so it will have an ajustible monitor size?

That's a bit to late to say now… I think…
Well, I think I could pull it off…

BTW. It's almost done, just need to do a few more things…


Edit: Eeeeh, does anyone know if a number is even? (2, 4, 6, 8, 10, 12 etc)
Otherwise it wont be possible.
theoriginalbit #15
Posted 15 June 2013 - 04:36 AM
Edit: Eeeeh, does anyone know if a number is even? (2, 4, 6, 8, 10, 12 etc)

if num % 2 == 0 then
  print("Number is even")
end
Also i suggest that using textutils.pagedTabulated could help you automatically and easily print on the monitor. just like the `ls` program does.
Tjakka5 #16
Posted 15 June 2013 - 04:37 AM
Edit: Eeeeh, does anyone know if a number is even? (2, 4, 6, 8, 10, 12 etc)

if num % 2 == 0 then
  print("Number is even")
end
Also i suggest that using textutils.pagedTabulated could help you automatically and easily print on the monitor. just like the `ls` program does.

Ah thanks, and I actually just completed the monitor part, so… meh.
anthonysteck #17
Posted 15 June 2013 - 04:39 AM
Thxs so much guys! :)/>
Tjakka5 #18
Posted 15 June 2013 - 04:41 AM
Thxs so much guys! :)/>

I managed to make it compatible with bigger monitors, now just to make a editor…
anthonysteck #19
Posted 15 June 2013 - 04:42 AM
Thxs so much guys! :)/>

I managed to make it compatible with bigger monitors, now just to make a editor…
ok can i just say ur AMAZING (:
Tjakka5 #20
Posted 15 June 2013 - 04:48 AM
Thxs so much guys! :)/>

I managed to make it compatible with bigger monitors, now just to make a editor…
ok can i just say ur AMAZING (:

Yes you can :)/>

Edit: Here's a little pic to show the progress so far:



Uploaded with ImageShack.us
theoriginalbit #21
Posted 15 June 2013 - 04:49 AM
ok can i just say ur AMAZING (:
Yes you can :)/>
One of the only willing "code monkeys" on these forums. :P/>
anthonysteck #22
Posted 15 June 2013 - 04:49 AM
Thxs so much guys! :)/>

I managed to make it compatible with bigger monitors, now just to make a editor…
ok can i just say ur AMAZING (:

Yes you can :)/>
haha ur amazing :P/>:P:P
Tjakka5 #23
Posted 15 June 2013 - 04:55 AM
Incase you didnt see the edit, here's a little pic:



Uploaded with ImageShack.us
anthonysteck #24
Posted 15 June 2013 - 05:00 AM
Incase you didnt see the edit, here's a little pic:



Uploaded with ImageShack.us
OMG ITS AWESOME thank you so much
Tjakka5 #25
Posted 15 June 2013 - 05:01 AM
Incase you didnt see the edit, here's a little pic:



Uploaded with ImageShack.us
OMG ITS AWESOME thank you so much

Ain't that a little bit overreactive?
Anyhow, I just need to make a simple thing to import and delete tasks, and then it's done and you can have it :)/>
anthonysteck #26
Posted 15 June 2013 - 05:03 AM
ok again i really appreciate it :)/>
Tjakka5 #27
Posted 15 June 2013 - 06:00 AM
This editor realy seems the hardest part of the program, mostly, because I'm fixing bugs inbetween.
I say, give me another 15 minutes, and it will be done.
anthonysteck #28
Posted 15 June 2013 - 06:03 AM
This editor realy seems the hardest part of the program, mostly, because I'm fixing bugs inbetween.
I say, give me another 15 minutes, and it will be done.
Ok, sweet :P/>
Tjakka5 #29
Posted 15 June 2013 - 06:13 AM
Ok, I'm sorry but I need a little bit longer…
I noticed a little flaw in the system, needed to add lots of things, made me make more files, and now I need to make a installer xD
anthonysteck #30
Posted 15 June 2013 - 06:19 AM
Ok, I'm sorry but I need a little bit longer…
I noticed a little flaw in the system, needed to add lots of things, made me make more files, and now I need to make a installer xD
Thats fine with me I really like how hard you are working on this your my new best friend :)/> lol Thanks alot again I am going to go to bed its really late I'll get back to you tommorow :)/>
Tjakka5 #31
Posted 15 June 2013 - 06:28 AM
You guys remember I said the editor was the hardest thing?
I was soooo right..

I have NO idea how I can delete a task…


If anyone feels like helping, this is what should happen:


tasks = {"Lol", "Lol2", "Lol3", "Lol4", "Lol5"}
--I want to delete task 2, or 'Lol2'

--Tasks[2] = Tasks[3]
--Tasks[3] = Tasks[4]
--Etc.
theoriginalbit #32
Posted 15 June 2013 - 06:40 AM
this one would delete by the task number

function deleteIndexedTask( _idx )
  for i = _idx, #tasks - 1 do
	tasks[ i ] = tasks[ i + 1]
  end
  tasks[ #tasks ] = nil
end

this one would remove all instances of a task that match the task text (requires above function as well)

function deleteByTask( _str )
  local _idx

  for i = 1, #tasks do
	while tasks[i] == _str do
	  deleteIndexedTask( _idx )
	end
  end
end

NOTE: Both will move all the tasks up a number in the list, that way you still keep the sequential indexes and don't have like
1.
2.
3.
5.
Edited on 15 June 2013 - 04:41 AM
Sorroko #33
Posted 15 June 2013 - 06:44 AM
-snip-

table.remove( table, index ) works just as well :P/>, and in your "delete task by text" code, that while loop should be an if statement
theoriginalbit #34
Posted 15 June 2013 - 06:50 AM
table.remove( table, index ) works just as well :P/>, and in your "delete task by text" code, that while loop should be an if statement
Ok granted table.remove works just as well, but the while loop is deliberate
this one would remove all instances of a task that match the task text
Sorroko #35
Posted 15 June 2013 - 06:57 AM
-snip-
this one would remove all instances of a task that match the task text
Still failing to see why you would need the while loop :o/> , the for loop is already looping through all the indexes, the while loop is acting as an if statement as tasks and _str will never change.
theoriginalbit #36
Posted 15 June 2013 - 07:00 AM
Still failing to see why you would need the while loop :o/> , the for loop is already looping through all the indexes, the while loop is acting as an if statement as tasks and _str will never change.
Lets assume we have this table
"buy something"
"kill something"
"make something"
"make something"
"do that"
and then we do

deleteByTask( "make something" )
the resulting table would be

"buy something"
"kill something"
"make something"
"do that"
this is because the second "make something" falls into the slot of the one we were just in, and it wouldn't recheck the index and thus it would remain.
Sorroko #37
Posted 15 June 2013 - 07:04 AM
-snip-

Hmm, I'll give you that :P/>, I would usually push all the indexes that need deleting into a table, then use the table of indexes to remove from the first. I blame Java and concurrent modification exceptions :)/>
theoriginalbit #38
Posted 15 June 2013 - 07:05 AM
I would usually push all the indexes that need deleting into a table, then use the table of indexes to remove from the first.
As long as you started from the last index and worked forwards that would also work.
Tjakka5 #39
Posted 15 June 2013 - 08:20 AM
Heres the program, sadly it has a few bugs I cant fix ATM…
http://www.computercraft.info/forums2/index.php?/topic/13490-todo-list/
Theadictablock #40
Posted 07 July 2013 - 04:33 AM
does it work with normal moniters and computers
not just advanced
lordnikon_13 #41
Posted 01 August 2013 - 02:18 AM
This was such an awesome program. I'll be using this in every one of my bases from now on. No more sign todo lists for my houses now.