We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I used the createWrite() to save my out file. I want to add the function for change folder by selectFolder() to save the file in new folder. but with fail to change folder. I got the new folder but failed to path to createWrite(), Is there any suggestion?
AbsolutePath = selection.getAbsolutePath();
println("new Folder = " + AbsolutePath );
fileoutput = createWriter( AbsolutePath + ADC" +str(month())+"-"+str(day())+"-"+str(year())+"_"+str(hour())+"."+str(minute())+"."+str(second())+".txt");
Answers
Find the solution from https://forum.processing.org/two/discussion/877/send-file-path-processing-to-pure-data-with-osc
AbsolutePath =join(split(selection.getAbsolutePath(), '\'), "/"); //change back-slash to slash fileoutput = createWriter( AbsolutePath + "/" + "ADC" +str(month())+"-"+str(day())+"-"+str(year())+"_"+str(hour())+"."+str(minute())+"."+str(second())+".txt"); //Add the path to output file