$input » History » Version 9
Per Amundsen, 02/01/2017 01:12 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 | 8 | Per Amundsen | _See also [[$yes]], [[$no]], [[$ok]], [[$cancel]], [[$timeout]]._ |
8 | |||
9 | 7 | Per Amundsen | _Can be prefixed with # to ensure the resulted text starts with a channel prefix._ |
10 | |||
11 | 1 | Per Amundsen | *parameters* |
12 | |||
13 | prompt - Question text. |
||
14 | [options] - (optional) |
||
15 | 4 | Per Amundsen | |
16 | 2 | Per Amundsen | e - Show input Editbox. |
17 | p - Show input password Editbox. |
||
18 | o - Show only a OK button. |
||
19 | y - Show Yes/No buttons. |
||
20 | n - Show Yes/No/Cancel buttons. |
||
21 | r - Show Retry/Cancel buttons. |
||
22 | v - Return [[$ok]], [[$yes]], [[$no]], [[$cancel]] for buttons. |
||
23 | g - Right-align buttons. |
||
24 | b - Disables buttons for a second when dialog is displayed. |
||
25 | 9 | Per Amundsen | f - Return [[$no]]/[[$cancel]] for edit/combo boxes if no/cancel is pressed. |
26 | 2 | Per Amundsen | i - Show the information icon. |
27 | q - Show the question icon. |
||
28 | w - Show the warning icon. |
||
29 | 1 | Per Amundsen | h - Show the error icon. |
30 | 9 | Per Amundsen | c - Show the recycle bin icon. |
31 | t - Show the favorites icon. |
||
32 | 2 | Per Amundsen | d - Play the system sound associated with the icon. |
33 | s - Indicates that [window] name has been specified. |
||
34 | 5 | Per Amundsen | a - Unminimize and focus the parent form. |
35 | 1 | Per Amundsen | u - use current active window as parent window |
36 | 2 | Per Amundsen | kN - Close/timeout the dialog after N seconds. On timing out, [[$timeout]] is returned if v is specified, otherwise [[$false]]. |
37 | 6 | Per Amundsen | m - Indicates that multiple text parameters have been specified. They will be displayed in a combobox. |
38 | 1 | Per Amundsen | |
39 | 2 | Per Amundsen | [window] - Window name to associate the dialog with. |
40 | 1 | Per Amundsen | [title] - The Titlebar text |
41 | [text] - The default text placed in the input Editbox. |
||
42 | |||
43 | *Example* |
||
44 | |||
45 | <pre> |
||
46 | ; Ask for a name and print it. |
||
47 | //echo -ag $input(What is your name?, Question) |
||
48 | </pre> |