From WikiChip
Editing mirc/identifiers/$input
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{mirc title|$input identifier}}'''$input''' is used to request immediate user-input. | {{mirc title|$input identifier}}'''$input''' is used to request immediate user-input. | ||
− | '''Note:''' This replaces the deprecated | + | '''Note:''' This replaces the deprecated '''$?''' identifier. |
+ | |||
==Synopsis== | ==Synopsis== | ||
Line 9: | Line 10: | ||
== Parameters == | == Parameters == | ||
− | * '''prompt''' - | + | * '''prompt''' - text displayed inside the input dialog window. The input dialog is extended vertically to display the prompt message if it is very long. You can also make text in the prompt message appear on different lines by using {{mIRC|$crlf}} to separate lines. |
* '''options''' - Options can be a combination of the following: | * '''options''' - Options can be a combination of the following: | ||
− | :* e - show input editbox | + | :* e - show input editbox |
− | :* p - show input password editbox | + | :* p - show input password editbox |
− | :* o - | + | :* o - ok button |
− | :* | + | :* y - yes no buttons |
− | :* | + | :* n - yes no cancel buttons |
− | :* r - | + | :* r - retry cancel buttons |
− | + | :* v - return $ok, $yes, $no, $cancel for buttons | |
− | :* v - | ||
− | |||
− | |||
:* g - right-align buttons | :* g - right-align buttons | ||
− | :* b - disables buttons for | + | :* b - disables buttons for a second when dialog is displayed |
− | :* | + | :* f - return $no/$cancel for edit/combo boxes if no/cancel is pressed |
− | :* d - play system sound associated with icon | + | :* iqwh - show the info, question, warning, and halt icons respectively. |
− | :* s - indicates that window | + | :* d - play system sound associated with icon. |
− | :* a - | + | :* s - indicates that window name has been specified |
− | :* u - use current active window as parent window, | + | :* a - activate dialog |
− | * '''window''' - if option '''s''' is specified, the name of the window to be used as parent window | + | :* u - use current active window as parent window |
+ | :* kN - an N second timeout value. On timing out, $timeout is returned if v is specified, no value if e is specified, and $false otherwise. | ||
+ | :* m - indicates that multiple text parameters have been specified. They will be displayed in a combobox. The first text item is the default item (a reference to an item in the list), the rest are the items in the list. | ||
+ | * '''window''' - if option '''s''' is specified, the name of the window to be used as parent window. | ||
* '''title''' - the titlebar text. | * '''title''' - the titlebar text. | ||
* '''text''' - default text placed in the input editbox | * '''text''' - default text placed in the input editbox | ||
− | The options, window, title, and text are optional parameters | + | The options, window, title, and text are optional parameters. |
− | By default, | + | By default, buttons return $true or $null, same as $?. If there is an input editbox, the ok/yes buttons always return the contents of the editbox (unless p switch is used). |
− | For the '''options''' parameter, you can also use a number as a combination of value added together | + | For the '''options''' parameter, you can also use a number as a combination of value added together, which is how $input was originally working: |
* '''1''' - show input editbox (equivalent of the 'e' switch) | * '''1''' - show input editbox (equivalent of the 'e' switch) | ||
* '''2''' - show input password editbox (equivalent of 'p' switch) | * '''2''' - show input password editbox (equivalent of 'p' switch) | ||
* '''4''' - ok button (equivalent of 'o') | * '''4''' - ok button (equivalent of 'o') | ||
* '''8''' - yes/no buttons ('y') | * '''8''' - yes/no buttons ('y') | ||
− | * '''16''' - | + | * '''16''' - yesnocancel buttons ('n') |
− | * '''32''' - return $ok, $yes, $no, $cancel | + | * '''32''' - return $ok, $yes, $no, $cancel for buttons. ('v') |
* '''64''' - show the info icon ('i') | * '''64''' - show the info icon ('i') | ||
* '''128''' - show the question icon ('q') | * '''128''' - show the question icon ('q') | ||
* '''256''' - show the warning icon ('w') | * '''256''' - show the warning icon ('w') | ||
− | * '''512''' - show the | + | * '''512''' - show the hand icon ('h') |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$input(sup,5) is equivalent to $input(sup,eo) | $input(sup,5) is equivalent to $input(sup,eo) | ||
Line 81: | Line 74: | ||
</source> | </source> | ||
Pops up an input request asking if the user likes chocolate. If they click '''Yes''', it echoes {{mirc|$true}} to the active window; otherwise, it echoes {{mirc|$false}}. | Pops up an input request asking if the user likes chocolate. If they click '''Yes''', it echoes {{mirc|$true}} to the active window; otherwise, it echoes {{mirc|$false}}. | ||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* {{mIRC|$?}} | * {{mIRC|$?}} | ||
+ | {{mIRC identifier list}} | ||
+ | |||
+ | [[Category:mIRC identifiers|input]] |