I'd like to create a dialog box to input some special characters onto InDesign without running the dialog every time, after I clicked on some button to input characters. A modeless dialog is the choice. But I got many crashes. Finally, with the sample from Adobe, I got a stable programming pattern, which works with Adobe CC. Here is the code: #targetengine session; // the above line is necessary to create a modeless dialog with // var win = new Window("palette", ...); // // refer to the sample program from Adobe: "SnpCreateDialog.jsx". // Which is usually located at the folder (Windows): // C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\SDK\Samples\javascript function AModelessDialog() { this.windowRef = null; } function setupWindow() { var ww = new Window("palette", "A Modeless Dialog"); addComponents(ww); return ww; } AModelessDialog.prototype.run = function() { var win = setupWindow(); this.windowRef = win; w...