Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>ginkeytime()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GINKEYTIME()

    This function goes hand-in-hand with GInkey().  It enables you to
    establish default time-out settings so that you can fall out after
    a given period of keyboard inactivity whenever a GInkey() wait
    state is active.

    Syntax

    GINKEYTIME(<nSetting> [, <newvalue>] )

    Required Parameter

    <nSetting> is the setting to retrieve or change.  The following
    three settings can be accessed:

    Manifest Constant
    (in GRUMP.CH)          Description
    -----------------      -----------
    GINKEYTIME             Seconds to wait before timing out of loop
    GINKEYEVENT            Code block to evaluate while within loop
    GINKEYEXIT             Code block to evaluate after timing out

    Optional Parameter

    <newvalue> is either a numeric or code block expression.  If you
    pass this, the appropriate setting will be changed to the contents
    of this parameter.

    Return Value

    GInkeyTime() returns the current setting corresponding to <nSetting>.
    For example, GInkeyTime(GINKEYTIME) returns the current number of
    seconds to wait before timing out of the GInkey() loop.

    INKEY User-Defined Command

    The INKEY preprocessor directive is provided in GRUMP.CH to simplify
    matters.

    INKEY [TIMEOUT <timeout>] [EVENT <event>] [EXIT <exit>]

    <timeout> is the number of seconds to wait before timing out of the
    GInkey() loop.

    <event> is a code block to continuously execute while inside the
    GInkey() loop.

    <exit> is a code block to be evaluated if you time out of the
    GInkey() loop.  If you do not specify an exit clause, the Grumpfish
    planetarium screen saver will automatically be invoked.

    Sample Usage

    #include "grump.ch"                             
    function test                                   
    inkey timeout 20 event gfclock()                
    ginkey(0)  // screen will be saved in 10 seconds
    return nil                                      

See Also: GINKEY()

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