Input Box
Verb: inputBox
Available from: <Standard>
Displays a dialog box for user input.
Syntax
inputBox --title(String) --prompt(String) [--value(String)] (String)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--title | Title | Required | Text | Title of the dialog window. |
--prompt | Prompt | Required | Text | Message to the user. |
--value | Default Value | Optional | Text | Initial value displayed in the input box. This value can be edited and even deleted. If deleted, a new value must be entered. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Text | Text | Text input by the user. |
Example
Prompts the user for an email, storing the typed text in a variable.
defVar --name typedText --type String
// Displays the window with the entered title and the prompt message to the user, storing what was entered in "typedtext".
inputBox --title "Save E-mail" --prompt "Enter your email!" --value "Type here!" typedText=value
logMessage --message "${typedText}" --type "Info"
//The above example requests the user's e-mail and presents the information entered in the console after it has been sent.
Remarks
If the user cancels the dialog box in any way (by clicking "Cancel" or closing the window), a runtime error is triggered ("User did not answer the Input box").