Project

General

Profile

$input » History » Version 3

Per Amundsen, 06/13/2016 07:47 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$input(prompt,[options],[window],[title],[text])*
4
5
Prompts the user for input and returns the result.
6
7
*parameters*
8
9
prompt - Question text.
10
[options] - (optional)
11 2 Per Amundsen
e - Show input Editbox.
12
p - Show input password Editbox.
13
o - Show only a OK button.
14
y - Show Yes/No buttons.
15
n - Show Yes/No/Cancel buttons.
16
r - Show Retry/Cancel buttons.
17
v - Return [[$ok]], [[$yes]], [[$no]], [[$cancel]] for buttons.
18
g - Right-align buttons.
19
b - Disables buttons for a second when dialog is displayed.
20 1 Per Amundsen
f - TODO
21 2 Per Amundsen
i - Show the information icon.
22
q - Show the question icon.
23
w - Show the warning icon.
24
h - Show the error icon.
25
d - Play the system sound associated with the icon.
26
s - Indicates that [window] name has been specified.
27
a - TODO ?
28 1 Per Amundsen
u - use current active window as parent window
29 2 Per Amundsen
kN - Close/timeout the dialog after N seconds. On timing out, [[$timeout]] is returned if v is specified, otherwise [[$false]].
30 1 Per Amundsen
m - TODO
31
32 2 Per Amundsen
[window] - Window name to associate the dialog with.
33 1 Per Amundsen
[title] - The Titlebar text
34
[text] - The default text placed in the input Editbox.
35
36
*Example*
37
38
<pre>
39
; Ask for a name and print it.
40
//echo -ag $input(What is your name?, Question)
41
</pre>