You are right, I misread the processing documentation so thank you for the correction.
However, I’m not sure
selectOutput() works with my existing code, or I’m possible not understanding it well enough. It still requires that a preexisting file be chosen from the hard drive. I want the user of my program to create a new file location that will be saved to.
A little more background. My program is built to track turns, dice rolls, and other in-game play information from a board game. I want this information saved so that I can create a save-progress function in my program to let the user stop mid game if desired. I currently have all of the information I need written into different .csv files in the
draw() function. When you stop the program, those files have the stored information from your stop point. The problem is unless you manually move the .csv files to a new directory or change the file names in the code before running again, they just get reset when you run the program a second time.
My goal when I asked this question was to try to let the user create a new directory at the start of the program where the .csv files will go. That way I could eventually write a function that allows that .csv data to be loaded back into the program like a save game style file without the user needing to relocate files on their own machine.
The way I currently have this programmed, all I need is for a prompt to ask the player what to call the save file. Then I can just use something like this to create a directory for the saved data that I can reference later.
saveTable(tablename, stringchosenbyuser +"/tablename.csv");
So, should I rewrite the existing code to save the data differently as the user proceeds through the program? Or, how can I prompt the user to assign a String value at the beginning of the program?