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>blankscr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BLANKSCR()

    Many people leave their workstations in the middle of a program and
    forget to come back until much later.  BLANKSCR() is useful for
    saving wear and tear on the monitor in these situations.  It waits a
    specified number of seconds for a keypress, and if none is detected,
    clears the screen.  It then displays a message that the screen has
    been saved, and that you can press any key to resume what you were
    doing before.  The syntax is:

    BLANKSCR(<delay>)

    Required Parameter

    <delay> is a numeric expression representing the number of seconds
    to wait before saving the screen.

    Return Value

    None

    After the screen has been saved and cleared, the wait screen will be
    refreshed every 20 seconds to avoid monitor 'burn-in'.

    If a keypress is detected before the waiting period has expired,
    control will return to the calling program and that keypress will be
    acted upon without being flushed from the buffer.  For example, in
    the sample code below, if the user pressed 'D' while in the
    BLANKSCR() function, it will be as though they selected the Data
    Entry option directly at the MENU TO statement.

    Sample usage

    @ 11,20 PROMPT ' Data Entry'              
    @ 12,20 PROMPT '  Reports  '              
    @ 13,20 PROMPT ' Utilities '              
    @ 14,20 PROMPT '   Quit    '              
    BLANKSCR(60)        && wait for one minute
    MENU TO main_sel                          

    Using BLANKSCR() with GET-IT(tm)

    Communications Horizons' GET-IT allows you to define and execute
    event procedures if no keypress is detected within a certain number
    of seconds.  If you own GET-IT, you will be happy to know that I
    have provided a variant of the screen saver, BLANKSCRN(), which is
    specially configured to work with it.  (This can be found in the
    source file BLANK2.PRG.)

    The primary difference between BLANKSCR() and BLANKSCRN() (other
    than one letter) is that BLANKSCRN() does not need to check for a
    keypress, because GET-IT will have already handled that.  Here is an
    example of using BLANKSCRN() with GET-IT:

    N_NOKEY(60,"Blankscrn")   && wait 1 minute

    Variants

    If you are a whimsical sort of programmer (sort of like yours truly),
    you might be interested in using my warped variant, BLANKSCR2() (see
    BLANK3.PRG). Instead of displaying the "screen has been saved..."
    message box, this version has a smiley-face dancing around randomly
    on the screen until a key is pressed.

    Also provided is BLANKSCR3() (in file BLANK4.PRG), which is a
    planetarium screen saver.

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