Copy link to clipboard
Copied
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");
Hi Simon
app dialogs were succeeded by SUI about a decade ago, SUI is in it's dying stages, app dialogs are already dead.
Either use SUI or Work on CS6 were your code will work.
HTH
Trevor
Copy link to clipboard
Copied
Hi Simon
app dialogs were succeeded by SUI about a decade ago, SUI is in it's dying stages, app dialogs are already dead.
Either use SUI or Work on CS6 were your code will work.
HTH
Trevor
Copy link to clipboard
Copied
Thanks Trevor. That's very helpful. The only books I could find to teach me are more than ten years old. Are there likely to be other areas where the code is obsolete?
Cheers
Simon
Copy link to clipboard
Copied
There are several DOM elements that have changed or been depreciated or introduced, there are lists of some of the changes.
I would recommend peter kahrel​ guides, SUI and GREP guides are excellent, he has on general InDesign scripting as well which I have not read but it's likely to be good too.
The adobe js manual is particularly useful as are the references here Where to locate the latest Indesign CC scripting documentation ?
For more advanced stuff there the toolkit guide see the link for more details
HTH
Trevor
Copy link to clipboard
Copied
Awesome, will check out those links. Thanks so much for taking the time to help me along my way, much appreciated!