• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Participant ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

508

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

LATEST

Hi,

take a look at alert.

alert is the javascript function.

Alert is the FrameMaker function

Markus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines