Added in 1.9.0

$input(prompt,[options],[window],[title],[text])

Prompts the user for input and returns the result.

See also $yes, $no, $ok, $cancel, $timeout.

Can be prefixed with # to ensure the resulted text starts with a channel prefix.

Parameters

Parameter Description
prompt Question text.
[options] (optional)
[window] Window name to associate the dialog with.
[title] The Titlebar text
[text] The default text placed in the input Editbox.

Options

Option Description
e Show input Editbox.
p Show input password Editbox.
o Show only a OK button.
y Show Yes/No buttons.
n Show Yes/No/Cancel buttons.
r Show Retry/Cancel buttons.
v Return $ok, $yes, $no, $cancel for buttons.
g Right-align buttons.
b Disables buttons for a second when dialog is displayed.
f Return $no/$cancel for edit/combo boxes if no/cancel is pressed.
i Show the information icon.
q Show the question icon.
w Show the warning icon.
h Show the error icon.
c Show the recycle bin icon.
t Show the favorites icon.
d Play the system sound associated with the icon.
s Indicates that [window] name has been specified.
a Unminimize and focus the parent form.
u use current active window as parent window
kN Close/timeout the dialog after N seconds. On timing out, $timeout is returned if v is specified, otherwise $false.
m Indicates that multiple text parameters have been specified. They will be displayed in a combobox.
1 Show input Editbox (equivalent of the 'e' switch)
2 Show input password Editbox (equivalent of 'p' switch)
4 OK button (equivalent of 'o')
8 Yes/No buttons ('y')
16 Yes/Bo/Cancel buttons ('n')
32 Return $ok, $yes, $no, $cancel for buttons. ('v')
64 Show the info icon ('i')
128 Show the question icon ('q')
256 Show the warning icon ('w')
512 Show the hand icon ('h')

Example

; Ask for a name and print it.
//echo -ag $input(What is your name?, Question)