Saving multiple images on keyPressed()
in
Programming Questions
•
11 months ago
Hey guys, I have created a sketch that evolves over time and I want to allow the audience to save them as images when they press "s', I have managed to get the file to save, the problem I encounter however, is that subsequent pressing of "s" overrides the previous file saved. I would like to enable them to save multiple images throughout the entire sketch, any help or advice would be greatly appreciated! This is my current code (which is wrong)! Thanks!
void keyPressed(){
if(key == 's'){
println("Saving...");
save("screen-####".jpg");
println("Done saving.");
}
}
1