I have a main stack that calls a simple substack that contains a few text fields, an "OK" button, and a "Cancel" button. Based on input from the user, this substack/dialog is called x number of times (in a repeat loop) with the 'OK' button putting the users text field responses into variables and closing the substack.
I need for the script to wait until the dialog has been displayed (the user selected number of) times and text field responses recorded each time. It seems like opening the substack as a modal (modal stack "substack") would be the way to go but when I click OK, the substack does not vanish and LC seems to lock up. I tried just "go to stack 'substack'" but the script continues to execute without waiting for the substack/dialog to be answered by the user which of course results in script errors.
I also need to ensure that if the user clicks 'Cancel' in the substack that the parent script outside the substack is also aborted.
Should I use a modal dialog? What line(s) of code do I need in each button to make this work?
Thank you,
Jon
