Question
How do we close the dialog box programmatically without click button using extendscript
Hi Folks,
Is there any possibilities to close dialog box programmatically without click button.
Sample code:
var dlg = new Window('dialog', 'Custom Dialog');
dlg.add('statictext', undefined, 'This is a custom alert!');
var closeBtn = dlg.add('button', undefined, 'Close', {name: 'ok'});
closeBtn.onClick = function() {
dlg.close(); // Programmatically close the dialog
}
dlg.show();
