$input » History » Version 5
Per Amundsen, 06/13/2016 10:42 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 | 4 | Per Amundsen | |
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 | 5 | Per Amundsen | a - Unminimize and focus the parent form. |
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 | |||
33 | 2 | Per Amundsen | [window] - Window name to associate the dialog with. |
34 | 1 | Per Amundsen | [title] - The Titlebar text |
35 | [text] - The default text placed in the input Editbox. |
||
36 | |||
37 | *Example* |
||
38 | |||
39 | <pre> |
||
40 | ; Ask for a name and print it. |
||
41 | //echo -ag $input(What is your name?, Question) |
||
42 | </pre> |