Project

General

Profile

$input » History » Version 2

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