We are about to switch to a new forum software. Until then we have removed the registration on this forum.
When we use selectOutput the field for the name is blank, I wish add the a temporaryName and the extension of the file, but I don't find a simple way to do that. All the track I find is a too complex java solution for me ? Below my idea, but naturally that's don't work :)
void draw() {}
void keyPressed() {
if(key == 's') selectOutput("Output to save:", "methodSaveCallback");
}
void methodSaveCallback(File selection) {
if (selection == null) {
println("Window was closed or the user hit cancel.");
} else {
println("User selected " + selection.getAbsolutePath());
}
}
// the idea
import java.io.File;
public class FileName{
FileName() throws Exception{
File f = File.createTempFile("tape_the_name_for_your_file", ".jpg");
System.out.println(f.getAbsolutePath());
f.deleteOnExit();
}
}
Answers
https://processing.org/reference/selectOutput_.html
Thx a lot. I don't understand why I don't see this solution before, because my first move it was to go on this page :(