Project

General

Profile

$input » History » Revision 3

Revision 2 (Per Amundsen, 06/13/2016 07:46 AM) → Revision 3/11 (Per Amundsen, 06/13/2016 07:47 AM)

_Added in 1.9.0_ 

 *$input(prompt,[options],[window],[title],[text])* 

 Prompts the user for input and returns the result. 

 *parameters* 

 prompt - Question text. 
 [options] - (optional) 
 <pre> 
 e - Show input Editbox. 
 p - Show input password Editbox. 
 o - Show only a OK button. 
 y - Show Yes/No buttons. 
 n - Show Yes/No/Cancel buttons. 
 r - Show Retry/Cancel buttons. 
 v - Return [[$ok]], [[$yes]], [[$no]], [[$cancel]] for buttons. 
 g - Right-align buttons. 
 b - Disables buttons for a second when dialog is displayed. 
 f - TODO 
 i - Show the information icon. 
 q - Show the question icon. 
 w - Show the warning icon. 
 h - Show the error icon. 
 d - Play the system sound associated with the icon. 
 s - Indicates that [window] name has been specified. 
 a - TODO ? 
 u - use current active window as parent window 
 kN - Close/timeout the dialog after N seconds. On timing out, [[$timeout]] is returned if v is specified, otherwise [[$false]]. 
 m - TODO 
 </pre> 

 [window] - Window name to associate the dialog with. 
 [title] - The Titlebar text 
 [text] - The default text placed in the input Editbox. 

 *Example* 

 <pre> 
 ; Ask for a name and print it. 
 //echo -ag $input(What is your name?, Question) 
 </pre>