Page 1 of 1

Control command for user input

Posted: 07 Nov 2023 19:36
by Kyle FM
Hi Bernd

We would like a new control command to prompt for user input in a dialog box with input field. The value entered by the user will be set as the value for a variable with a given name.

We would use this for things like:
  • Setting the name of a recording
  • Setting the name of a file that is downloaded from FTP
  • Creating a shortcut in the user commands to set the streaming title for a specific streaming server
  • ....

Parameters:
  • Name of the variable that will be set with the value from the input box
  • Title of the dialog box
  • Text of the dialog box below the title

Some edge cases to consider:
  • When clicking cancel or closing the dialog the value should be set to 0/false, so a EXEC_COMMAND2 can be used to only continue when an actual value has been entered

Re: Control command for user input

Posted: 08 Nov 2023 19:30
by radio42
A new v4.4.1.6 is available in which I added a new EXEC_VAR_SET_DIALOG command!

It sets an internal user variable with the text input of a user dialog.
Parameter: name|title|prompt[|text]
name: the name of the user variable to set;
title: the title of the dialog;
prompt: the prompt text above the editor;
text: the optional text input value.
Use the ${VAR:name} macro or EXEC_VAR_GET to retrieve it. If the dialog is canceled or no data is entered the user variable is removed.