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

How to index stuff in tables?

Started by Mackan90096, 24 August 2014 - 09:30 AM
Mackan90096 #1
Posted 24 August 2014 - 11:30 AM
Hi! I'm making an os, and I'm currently stuck on the programs screen thingy..
I want to be able to have the files of a folder be printed dynamically, for example, x is in the program folder, program screen prints x.
I also want to be able to index the filename, length of the filename and the y pos of it and then be able to look that up with a mouse_click pulled event and then run that file.
How would I easily do this? Thanks in advance - Mackan90096
Bomb Bloke #2
Posted 24 August 2014 - 11:47 AM
That's not a very specific question, and difficult to address without knowing where you're up to.

This bit of code generates a menu from a table filled with most any amount of items. I guess take a read through it and ask questions if you have them.
Mackan90096 #3
Posted 24 August 2014 - 12:10 PM
Yes, that is what I'm looking for. I'll modify it and use it, thanks :)/>