CT_KEYTIME

 KEYTIME()
 Triggers a key trap at a specific clock time
------------------------------------------------------------------------------
 Syntax

     KEYTIME([<nKeyValue>,<cClocktime>]) --> lActivated

 Arguments

     <nKeyValue>  Designates the character to place in the keyboard
     buffer.

     <cClocktime>  Designates the specified time to place the character
     in the keyboard buffer.

     ()  When called without parameters, the function completely uninstalls.

 Returns

     KEYTIME() returns a .T. to indicate the specified character was placed
     in the keyboard buffer at the desired time.

 Description

     Warning!  Use on AT-class systems only!

     KEYTIME() executes a specific program at an indicated time.  To do this,
     the function places the desired key code in the keyboard buffer at the
     selected clock time.  If a procedure is established with
     SET KEY..TO, Clipper calls the procedure if, or when, you are in a
     wait state.  This allows you to perform specific tasks at a particular
     time of day such as file backups.

     There is also a special variant over and above an exact time
     designation.  You can specify "99" for hours, minutes, or seconds, which
     modifies the interpretation of this portion of the time designation.  A
     time string of "10:99:00" instructs the function to trigger a key trap
     every minute between 10:00 and 10:59.

     If you want to specifically uninstall the function from the program,
     call it without specifying parameters.

 Notes

     Warning!  Always uninstall the function before you leave the program
     or use the CTUS.LIB Extended Drivers found in Clipper Tools.  This
     function changes the interrupt vectors, and if the previous status is
     not restored before you leave the program, a system crash will
     eventually occur.

     .  Only one time monitor can be active at any given time.  A
        subsequent call to KEYTIME() deactivates the previous one.

     .  You can use any symbols defined in the Clipper file
        INKEY.CH.   You can set any other keys described in the Clipper
        Tools header file CTSCAN.CH.

 Examples

     .  Place key code 7 in the keyboard buffer at 12:30:

        ? KEYTIME(7, "12:30:00")      // .T.

     .  Place key code 255 in the keyboard buffer at 2:00 PM:

        ? KEYTIME(255, "2")           // .T.

     .  Place key code 7 in the keyboard buffer at midnight:

        ? KEYTIME(7, "00:00:00")      // .T.

     .  Set a key trap every second, starting at 11:59 PM:

        ? KEYTIME(7, "11:59:99")      // .T.

     .  Set a key trap every full hour:

        ? KEYTIME(7, "99:00:00")      // .T.

     .  Call with an invalid time:

        ? KEYTIME(7, "25:30:00")      // .F.

     .  Uninstall KEYTIME():

        ? KEYTIME()                   // .F.

See Also: KEYSEC() LASTKLINE() LASTKFUNC() LASTKPROC()

 

Introduction Miscellaneous Functions

 

Introduction

     Functions that do not belong in any other module are assembled in this
     group under the Miscellaneous heading.  However, this does not imply
     they are less useful.  For example, use KEYTIME() or KEYSEC() to
     activate a Clipper procedure at a specific time, after a delay of
     seconds, implement file saves, or control demo programs.

     This module enables you to determine complements, determine data types,
     and query keyboard scan codes.

 Passing Parameters by Reference

     Finally, this chapter discusses functions that permit you to pass
     parameters by reference.  To find more information on this subject, see
     Chapter 4, String Manipulations.

Tools – Miscellaneous Functions

Introduction Miscellaneous Functions
ALLOFREE()*  Determines the maximum memory size allocation
BLANK()      Creates a blank value for each data type
COMPLEMENT() Forms the complement value of a data type
DATATYPE()*  Determines the data type of a variable or UDF
GETTIC()     Determines the number of timer ticks
KBDDISABLE() Locks/unlocks the keyboard
KBDEMULATE() Inserts characters into BIOS keyboard buffer to emulate input
KBDSPEED()   Sets keyboard auto repeat speed
KBDSTAT()    Tests for key shift state status, such as Ctrl and Shift
KBDTYPE()    Determines the type of keyboard in use
KEYSEC()     Triggers a key trap after a time delay
KEYTIME()    Triggers a key trap at a specific clock time
MILLISEC()   Time delay in milliseconds
NUL()        Converts the value returned by a function into a null string
SCANKEY()    Queries scan code of keyboard input
SETTIC()     Increases number of time ticks
SHOWKEY()    Continuously displays the INSERT and LOCK status
SOUND()      Creates tones (melodies) by designating frequency and duration
SPEED()      A comparison value used to determine the processor speed
STACKFREE()  Determines the remaining stack space
TOOLVER()    Queries the version number of the Clipper Tools in use
XTOC()       Converts an expression of any data type into a string