1 Reply Latest reply on Apr 4, 2012 10:09 AM by Wiedenmaier

    Is there a way to exit a script based on user input?

    jaloren28 Level 2

      I have a function that loops through a document doing a find and replace. To ensure an infinite loop doesn't occur, I add a counter to the function that increments up after each loop. Once the counter reaches a 1,000, the function will exit. Instead of doing a hard exit, would there be a way to prompt the user with a dialog box that says "Do you want to continue? Yes or No." ? If the user selects "Yes", then the counter is reset to zero and the function continues. If the user selects "No", then the script exits the function.