4 Replies Latest reply on Apr 4, 2017 5:49 AM by simonvg

    dialog returns boolean as false when it should be true

    simonvg

      Hi - I made the following code to test a problem I am having with a dialog inside a do-while loop. It seems the second time the loop runs, the boolean value comes back as false when it should be true. Clicking "OK" on my dialog should cause another round of the loop, but instead the loop is exited and the last bit of code runs. I'm testing this in the latest version of InDesign CC 2017. Any help would be much appreciated. Thanks!

       

      var dlg = app.dialogs.add();

      var bln=true;

      do{

          alert("value of bln "+bln);

          bln = dlg.show();

          alert("now value of bln "+bln);

          }

      while(bln == true)

      alert("done");