dlg.addTextCtrl (id, label, value); dlg.addMultilineCtrl (id, label, value); dlg.addPasswordCtrl (id, label, value); dlg.addSelectCtrl (id, label, value, option1, option2, ...); dlg.addCheckCtrl (id, label, value); dlg.addStaticText ([id,]label); dlg.addButton (id, label, [callbackFn]);
With the addCtrl() functions you add controls to a dialog object. When done, you can show the dialog using Dialog.show() or Dialog.showModal() and query the values entered by the user after the dialog is closed.
With the addButton() function you can add buttons to the dialog. If the user presses the button, the given callback function is called.
Example:
var d = new Dialog;
d.addTextCtrl('name', 'Your name:');
d.addSelectCtrl('like', 'Like this script?', 0, 'yes', 'no');
if( d.showModal() == 'ok' )
{
usersName = d.getValue('name');
likeOrDislike = d.getValue('like');
}

See also: Dialog.showModal(), Dialog.show(), Dialog.getValue(), Dialog.setValue()