Error Checking of Dialog Windows Input
I have three functions:
createDialog() - creates a dialog window for input
errors() - check for errors in the dialog window
results() - generate the results of the dialog window
All three functions work as expected. For example, after the dialog is created if there are no errors the results generate an InDesign file. If there is an error, an alert is created and everything stops.
I am trying to createDialog() after errors() and do so until there are no errors and results() are returned without having to run the script from the Scripts Panel. The best I could do is createDiallog() after an error check by
if (typeof createDiallog !== 'undefined' || createDiallog !== null){
errors();
createDialog();
}
but this will not re-run errors() after clicking OK.
Is it possible to do what I am trying to accomplish?
