Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>getsecret()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GETSECRET()
 Keyboard input function for hidden input (similar to a GET field)
------------------------------------------------------------------------------
 Syntax

     GETSECRET(<cDefault>,[<nRow>],[<nColumn>],[<lSAY>],
        [<cPrompt>]) --> cInput

 Arguments

     <cDefault>  Designates the length and contents of the input field.

     <nRow>  Designates the row in which the input occurs.  The default
     is the current cursor position.

     <nColumn>  Designates the column in which the input occurs.  The
     default is the current cursor position.

     <lSAY>  When you specify .T. and close GETSECRET(), the actual data
     input is displayed with the default color attribute.

     <cPrompt>  Designates the text to display in front of the input
     field at the selected coordinates.

 Returns

     GETSECRET() returns the input string.

 Description

     If you call this function, a simple input field is made available.  All
     characters input are displayed as asterisks (*) to hide the actual
     input.  All control keys are interpreted exactly as in a CA-Clipper GET
     mask.

     The length and default for the string are specified in the <cDefault>
     parameter.  This allows a normal input field to be portrayed with VAR =
     SPACE(length).  The input field starts at the current cursor position or
     at the designated row and column.

     Similar to @ ... SAY ... GET, you can also display text just before the
     input field.  The field starting position is moved accordingly

     In the CA-Clipper SET COLOR TO command, the first color you designate is
     used for screen output; the second for input fields. GETSECRET() uses
     these color designators exactly like CA- Clipper.  If you designate the
     <lSAY> parameter as .T., you can determine (as with a SAY), whether the
     data is redisplayed in its amended form at the point of input.  However,
     GETSECRET() only displays asterisks to hide this data.  This is useful
     when input breaks off due to an ESC, because at least the correct number
     of asterisks is displayed.  The affected area also contains the standard
     color attribute.

 Notes

     .  GETSECRET() uses the CA-Clipper console input internal
        routines and supports the INS display in SCOREBOARD.  In addition,
        the SET ESCAPE, SET BELL, SET INTENSITY, SET DELIMITERS, and SET
        CONFIRM switches are acknowledged.

     .  Key traps may occur with GETSECRET() when the cursor position
        within a field is saved.  You can then call GETSECRET() recursively,
        as long as sufficient stack memory is available.

 Examples

     .  Show the secret field at the current cursor position:

        cVar:= SPACE(20)            // 20 position secret field
        cVar:= GETSECRET(cVar)      // Retain input attribute

     .  Show the secret a 10-space field,  row 10, column 20:

        cVar:= GETSECRET(SPACE(10), 10, 20)

     .  After input is finished, the actual data input is redisplayed
        on the screen.  This area contains the standard color attribute.  The
        input is moved by the text preceding the input field:

        SET CONFIRM ON              //  Close with RETURN
        cVar:= "Default text"
        GETSECRET(cVar, 10, 20, .T., "Please input: ")


See Also: GETINPUT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson