Reply To a Script Dialog
9 November 2016
- Release 9.143 - replying now requires just the dialog UUID and either
indexorlabelor both can be specified. The command now requires theactionparameter to be set to eitherreply,ignoreorpurge.
21 August 2016
- Release 9.117 - the
indexparameter is now optional.
17 June 2016
- Release 9.91 - added the ability to ignore a dialog.
21 December 2014
- Release 7.34 - renamed the command from
replytodialogtoreplytoscriptdialog.
The replytoscriptdialog command can click a button on a dialog pop-up. The dialog data from where the required parameters can be retrieved is given by the dialog notification using the notify command.
| Command | Required Parameters | Required Corrade Permissions | Example |
|---|---|---|---|
replytoscriptdialog | group, password, action | interact | llInstantMessage(CORRADE, wasKeyValueEncode( [ // Reply to a script dialog by // pressing a button. "command", "replytoscriptdialog", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), // reply to a dialog "action", "reply", // the name of the button to press "button", "Menu", // the dialog UUID "dialog", "35afb3f-0cf5-4ab6-9364-11a9f3df1148", "callback", wasURLEscape(URL) ] ) ); |
| Parameter | Possible Value | Required Parameter | Possible Value | Description |
|---|---|---|---|---|
action | reply | button or index | Either the button label or the index of a button on the dialog. | Reply to a script dialog. |
dialog | The UUID of the dialog. | |||
ignore | dialog | The UUID of the dialog. | Ignore a dialog. | |
purge | Purge all tracked dialogs. |
Notes
- To reply to a dialog, you need the dialog UUID - this dialog UUID can be either received asynchronously by binding to the dialog notification, or synchronously retrieved by polling the currently tracked dialogs using the getscriptdialogs command.
- When replying to a dialog with
actionset toreply, if you specify justbutton, then the command may be ambigous in case the dialog has two or more buttons with the same label. In order to avoid the ambiguity, passindexinstead which will make it clear which button Corrade should press. To make the command stronger, pass bothbuttonandindex, in which case Corrade will preform an extra check to see whether the label passed tobuttonis at the specifiedindex.