Hi!
i’m trying to have a save function that allows you to name the file and choose where you would like your save to go.
So far with the code I have, its allows you to save and make/choose a folder but then places it onto the desktop with the name of the folder added onto the files name.
Have a look with the code below, any help would be great.Thanks!
void setup(){
size(1080,720);
background(255);
}
void draw(){
ellipse(100,100,100,100);
strokeWeight (50);
}
void keyPressed()
{
if (key == 'r')
{
setup();
}
if (key ==' ')
{
selectFolder("select a folder to process", "folderSelected");
}
}
void folderSelected (File selection)
{
if (selection == null)
{
return;
}
else
{
String dir2 = selection.getPath();
save(dir2+"Painting#.jpg");
}
}