var confirmed = confirm ("You picked [ " + selected_rbutton (totalgroups) +" ]"+ "\nYou picked [ " + questionResize (rsizechoice) + " ] to resize" + "\n" +"\nContinue?"); confirm.noAsDflt == false; if (confirmed == true) { copy(); openTemp (); paste(); centerArt (); resizeart (); savefile () putname (); } /*end if */ else { alert ("You chose not to continue, script stopped") }//end else }//end if OK
I've coded everything inside separate functions this way I can save space letting the user make a choice and each choice will use different groups of functions. My only problem is that the some of the functions are still doing their thing when the next starts but it may depend on the one above it to finish. Function savefile () lets the user type in a new name and it saves to a couple different folder then Function putname () puts that users name and file name at the top of the artboard in the corner. What is happening is that the user is chooseing to rename the file but the Function putname () has already filled its variables with the old name not the new one. How can I make it wait till function savefile () is done?