home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / INHP12.ZIP / HLPEXC.PRG next >
Encoding:
Text File  |  1988-03-06  |  5.2 KB  |  97 lines

  1. * Program..: HLPEXC.PRG
  2. * Author...: RAM
  3. * Date.....: 03/06/88
  4. * Notice...: Copyright (c) 1988, XEC Development, INC., All Rights Reserved.
  5. * Notes....: Programs for exceptions to the Instant Help System Version 1.2
  6.  
  7. ****************************************************************************
  8. *    See exceptions discussion in the Instant Help System Documentation    *
  9. ****************************************************************************
  10.  
  11. ****************************************************************************
  12. *   This part of a program checks for the F1 and ALT+H keys to be pressed  *
  13. *   if you are using the inkey() statement to do certain keyboard        *
  14. *   processing.  The inkey() instruction is NOT a valid "wait" state in    *
  15. *   Clipper, so if a set key to instruction is being used, F1 and ALT+H    *
  16. *   will NOT function.  So we have to make them function (unless you don't *
  17. *   want them to).                               *
  18. ****************************************************************************
  19.  
  20.     case lastkey() = 28  && Help F1 pressed
  21.        do help with "DLCSMAGET", 723, "INKEY"
  22.         ************************************************************
  23.     *  Send the program name, the line number and the variable *
  24.     *  editing to HELP.PRG.  NOTE:  It doesn't really matter   *
  25.     *  what the program, line and variable are, as long as you *
  26.     *  send the same information with the ALT+H key (see       *
  27.     *  below).                           *
  28.         ************************************************************
  29.  
  30.     ********************************************************************
  31.     *  NOTE:  Comment out next case statement when finished with       *
  32.     *         INSTAHLP.                               *
  33.     ********************************************************************
  34.     case lastkey() = 291  && ALT-H Pressed.
  35.        do INSTAHLP with "DLCSMAGET", 723, "INKEY"
  36.         ************************************************************
  37.     *  This is the same program, line and variable sent as in  *
  38.     *  the above check on the F1 (key 28) key.  This is very   *
  39.     *  important in that if you don't send matching            *
  40.     *  information (only program and variable matter), the     *
  41.     *  help created with ALT+H will NOT be displayed when F1   *
  42.     *  is pressed.                                             *
  43.         ************************************************************
  44.  
  45. ... your program checking other keys ...
  46.  
  47.  
  48. ******************************************************************************
  49. *  This next function is for the memoedit command:                 *
  50. *      replace VAR with memoedit(VAR, x1, y1, x2, y2, <.L.>, "DLCSM_EVAL")   *
  51. *  or  VAR = memoedit(VAR, x1, y1, x2, y2, <.L.>, "DLCSM_EVAL")               *
  52. *  Put this program in for the function which memoedit calls when it is      *
  53. *  active.                                                 *
  54. ******************************************************************************
  55.  
  56. function DLCSM_EVAL  && Evaluate F1 and/or ALT-H (If instahlp is installed).
  57.  
  58. *****************************************************************************
  59. *   This function will send F1 or ALT-H (if INSTAHLP is installed) to the   *
  60. *   correct program.  The reason for this function is to send the program, *
  61. *   line number, and variable that you want to send, because when an        *
  62. *   interrupt key is pressed in MEMOEDIT, only "MEMOEDIT" is sent to the    *
  63. *   interrupt program.  Line and Variable are NOT sent.  Therefore, you     *
  64. *   must send them yourself, or HELP and INSTAHLP will ignore the call.     *
  65. *****************************************************************************
  66.  
  67. parameters mode, line, col  && Sent from MEMOEDIT.
  68.  
  69. if mode = 1 .or. mode = 2  && Sending a keystroke.
  70.    if lastkey() = 28  && Help Key pressed.  Send to HELP.
  71.       do HELP with "DLCSMAGET", 672, "CO_COMM"
  72.         ************************************************************
  73.     *  Send the program name, the line number and the variable *
  74.     *  editing to HELP.PRG.  NOTE:  It doesn't really matter   *
  75.     *  what the program, line and variable are, as long as you *
  76.     *  send the same information with the ALT+H key (see       *
  77.     *  below).                           *
  78.         ************************************************************
  79.       
  80.     **********************************************************************
  81.     *  NOTE:  Comment out (put "*"'s in front of) the next 2 lines of    *
  82.     *         code if instahlp is not installed.                         *
  83.     **********************************************************************
  84.     elseif lastkey() = 291  && ALT-H Pressed.
  85.       do INSTAHLP with "DLCSMAGET", 672, "CO_COMM"
  86.         ************************************************************
  87.     *  This is the same program, line and variable sent as in  *
  88.     *  the above check on the F1 (key 28) key.  This is very   *
  89.     *  important in that if you don't send matching            *
  90.     *  information (only program and variable matter), the     *
  91.     *  help created with ALT+H will NOT be displayed when F1   *
  92.     *  is pressed.                                             *
  93.         ************************************************************
  94.    endif
  95. endif
  96. return 0  && Prosess last key pressed.
  97.