Posted 19 December 2012 - 01:45 PM
I'm working on a very large and complex project that will run instructions from a file. However, I'm at a loss on how to implement a file selection mechanism. Something that will read how many, and what files are in a given directory, and then prompt the user to pick one using two redstone buttons, one to switch files, and one to choose; all displayed on a monitor. It likely involves arrays and or tables, which I don't have much experience with yet. It would also be useful to read say the first line or two of each file and place it into an array, to display under the filename, say a description or somesuch. Once picked, it will set the chosen filename to a variable, and then the program would then load the file and start reading instructions from it (this ive already almost figured out).
I'm not looking for complete code, but some examples on how to get the list of files, then pick them would be greatly appriciated.
I'm not looking for complete code, but some examples on how to get the list of files, then pick them would be greatly appriciated.