Difference between revisions of "INPUTBOX()"

From Lianjapedia
Jump to: navigation, search
Line 11: Line 11:
 
The INPUTBOX()function is used to display a dialog box with OK and Cancel buttons allowing the user to input a string.  The message, title and default value to display in the box can be defined.  If the user clicks the OK button INPUTBOX() returns the input string.  If the user clicks the Cancel button or pressed Esc, an empty string is returned.
 
The INPUTBOX()function is used to display a dialog box with OK and Cancel buttons allowing the user to input a string.  The message, title and default value to display in the box can be defined.  If the user clicks the OK button INPUTBOX() returns the input string.  If the user clicks the Cancel button or pressed Esc, an empty string is returned.
  
{| class="wikitable" width=100%
+
{| class="wikitable" width="100%"
!width=25%|Parameters||width=20%|Required||Description
+
!width="25%"|Parameters||width="20%"|Required||Description
 
|-
 
|-
|valign=top|<expC1>||valign=top|Yes||The prompt displayed in the dialog box
+
|valign="top"|<expC1>||valign="top"|Yes||The prompt displayed in the dialog box
 
|-
 
|-
|valign=top|<expC2>||valign=top|No||The title displayed in the dialog box
+
|valign="top"|<expC2>||valign="top"|No||The title displayed in the dialog box
 
|-
 
|-
|valign=top|<expC3>||valign=top|No||The default value displayed in the dialog box.  If this is set to '*', any entered text is not echoed, so can be used for password entry.
+
|valign="top"|<expC3>||valign="top"|No||The default value displayed in the dialog box.  If this is set to '*', any entered text is not echoed, so can be used for password entry.
 
|-
 
|-
 
|}
 
|}

Revision as of 10:49, 5 February 2013

Purpose

Function to display a dialog box with for user input of a string

Syntax

INPUTBOX(<expC1> [, <expC2> [, <expC3>]])

See Also

ETOS(), MESSAGEBOX()

Description

The INPUTBOX()function is used to display a dialog box with OK and Cancel buttons allowing the user to input a string. The message, title and default value to display in the box can be defined. If the user clicks the OK button INPUTBOX() returns the input string. If the user clicks the Cancel button or pressed Esc, an empty string is returned.

Parameters Required Description
<expC1> Yes The prompt displayed in the dialog box
<expC2> No The title displayed in the dialog box
<expC3> No The default value displayed in the dialog box. If this is set to '*', any entered text is not echoed, so can be used for password entry.

Example

nReturn = inputbox("Please enter your password:", "System login", "*")
if not empty(nReturn)
    select users
    seek username()
    if password = nReturn
        // match
    else
        // nomatch
    endif
    // no password entered
endif