$input » History » Version 11
Per Amundsen, 02/23/2023 02:03 PM
| 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 | 11 | Per Amundsen | *Parameters* |
| 12 | 1 | Per Amundsen | |
| 13 | 11 | Per Amundsen | table(ktable). |
| 14 | |*Parameter*|*Description*| |
||
| 15 | | prompt | Question text. | |
||
| 16 | | [options] | (optional) | |
||
| 17 | | [window] | Window name to associate the dialog with. | |
||
| 18 | | [title] | The Titlebar text | |
||
| 19 | | [text] | The default text placed in the input Editbox. | |
||
| 20 | 2 | Per Amundsen | |
| 21 | 11 | Per Amundsen | *Options* |
| 22 | 2 | Per Amundsen | |
| 23 | 11 | Per Amundsen | table(ktable). |
| 24 | |*Option*|*Description*| |
||
| 25 | | e | Show input Editbox. | |
||
| 26 | | p | Show input password Editbox. | |
||
| 27 | | o | Show only a OK button. | |
||
| 28 | | y | Show Yes/No buttons. | |
||
| 29 | | n | Show Yes/No/Cancel buttons. | |
||
| 30 | | r | Show Retry/Cancel buttons. | |
||
| 31 | | v | Return [[$ok]], [[$yes]], [[$no]], [[$cancel]] for buttons. | |
||
| 32 | | g | Right-align buttons. | |
||
| 33 | | b | Disables buttons for a second when dialog is displayed. | |
||
| 34 | | f | Return [[$no]]/[[$cancel]] for edit/combo boxes if no/cancel is pressed. | |
||
| 35 | | i | Show the information icon. | |
||
| 36 | | q | Show the question icon. | |
||
| 37 | | w | Show the warning icon. | |
||
| 38 | | h | Show the error icon. | |
||
| 39 | | c | Show the recycle bin icon. | |
||
| 40 | | t | Show the favorites icon. | |
||
| 41 | | d | Play the system sound associated with the icon. | |
||
| 42 | | s | Indicates that [window] name has been specified. | |
||
| 43 | | a | Unminimize and focus the parent form. | |
||
| 44 | | u | use current active window as parent window | |
||
| 45 | | kN | Close/timeout the dialog after N seconds. On timing out, [[$timeout]] is returned if v is specified, otherwise [[$false]]. | |
||
| 46 | | m | Indicates that multiple text parameters have been specified. They will be displayed in a combobox. | |
||
| 47 | | 1 | Show input Editbox (equivalent of the 'e' switch) | |
||
| 48 | | 2 | Show input password Editbox (equivalent of 'p' switch) | |
||
| 49 | | 4 | OK button (equivalent of 'o') | |
||
| 50 | | 8 | Yes/No buttons ('y') | |
||
| 51 | | 16 | Yes/Bo/Cancel buttons ('n') | |
||
| 52 | | 32 | Return $ok, $yes, $no, $cancel for buttons. ('v') | |
||
| 53 | | 64 | Show the info icon ('i') | |
||
| 54 | | 128 | Show the question icon ('q') | |
||
| 55 | | 256 | Show the warning icon ('w') | |
||
| 56 | | 512 | Show the hand icon ('h') | |
||
| 57 | 1 | Per Amundsen | |
| 58 | *Example* |
||
| 59 | |||
| 60 | <pre> |
||
| 61 | ; Ask for a name and print it. |
||
| 62 | //echo -ag $input(What is your name?, Question) |
||
| 63 | </pre> |