home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / prg_hlp.zip / PRG_HLP.PRG < prev    next >
Text File  |  1987-04-07  |  38KB  |  1,403 lines

  1. ************************************************************************
  2. *                          PRG_HLP.PRG   version 1.2                   *
  3. *                   S. ROBERT DAVIDOFF, D.M.D.                         *
  4. *                         November 1986                                *
  5. ************************************************************************
  6. *    This program will allow you to make modifications in your .PRG
  7. *    files and your database files from within your CLIPPER program.
  8. *    It is a debugging tool that I designed to help me write my programs
  9. *     more efficiently. I got tired of "jumping out" of my Clipper programs
  10. *    to edit files and edit databases and make new databases, and use dflow
  11. *    and Documentor to help me debug, and........
  12. *    In order to take maximum use of the program, you should have (AS IN 
  13. *    PURCHASE!!!) the following programs:
  14. *
  15. *                        THE NORTON EDITOR   (NE)
  16. *                 NORTON UTILITIES DIRECTORY SORT  (DS.COM)
  17. *                        DFLOW                          (WALLSOFT)
  18. *                        THE DOCUMENTOR   (DOC)    (WALLSOFT)
  19. *
  20. *    You may, of course, substitute another editor for the Norton Editor and
  21. *    you may choose to not use one or more of the other programs that I have
  22. *    incorporated here, BUT to get maximum effect, I would suggest that you 
  23. *    purchase and use all of the programs... They were all designed as serious
  24. *    adjuncts to serious programming. 
  25. *
  26. *    You can also link in DOT.PRG which comes on the Clipper Autmn disk. DOT 
  27. *    is supposed to do some of these things, but I found my program to be more
  28. *    reliable and easier to operate.
  29. *
  30. *    The beauty of this program is that you merely have to hit the F2 key 
  31. *  from any "Wait" state in your running clipper program and you can 
  32. *  Tinker with all the .prg files and databases without leaving clipper.
  33. *    Make as many changes as you would like and then continue running your
  34. *    clipper program. When your through debugging, simply recompile and your
  35. *    in business! You can also make new databases as well as modifying old 
  36. *    ones from inside your Clipper program.
  37. **********************************************************************
  38. *
  39. *               CREDIT WHERE CREDIT IS DUE!!!!
  40. *
  41. **********************************************************************
  42. *    I wish to thank the DATABASED ADVISOR magazine from which some of my 
  43. *    better ideas eminate. This program is based on information from 
  44. *    DataBased Advisor, particularly J. Ari Kornfeld's article in the 
  45. *    December 1986 issue. I have consistently found this magazine to be 
  46. *    the best source of usefull information for my programming needs!!!
  47. **********************************************************************
  48. **********************************************************************
  49. *
  50. *                   BEFORE YOU BEGIN....
  51. *
  52. **********************************************************************
  53. *    The calling program has to set the F2 key as follows:
  54. *
  55. *                      SET KEY -1 TO PRG_HLP
  56. *
  57. *  This will activate this program from any "wait" state when the F2 key
  58. *  is pressed.
  59. *
  60. *  The variable "REPEAT", must be initialized by the calling program as
  61. *  a PUBLIC  variable (which is automatically set to .F.). This will prevent
  62. *  a recurrsive call of this program. The parameters passed are the same as
  63. *  the normal Clipper HELP program.
  64. *  The PROCEDURES INDEX_H and REINDEX_ are set up for your specific programs.
  65. *  I have included them here as demonsration modules. You have to set
  66. *    then up for your own programs and you have to change them as you add or
  67. *    subtract databases and/or indexes
  68. *
  69. **********************************************************************
  70. *
  71. *  PLEASE BE AWARE THAT THERE ARE STILL SOME BUGS IN THIS PROGRAM!!!!
  72. *  I will release updates as they come along.
  73. *  You are encouraged to make any modifications that you wish. I would hope
  74. *  that any improvements generated will be thrown back into the public domaine
  75. *  area so that others may use them.....
  76. *  If you like the program or if you have any comments, please leave me a 
  77. *  message on the Source.
  78. *
  79. *      Bob Davidoff
  80. *                              SOURCE ID:  NA2066
  81. **********************************************************************
  82. **********************************************************************
  83. parameters call_prg,Line_num,input_var
  84. MHLP_CODE = HELP_CODE
  85. HELP_CODE = "00"
  86. public hselection
  87. set console on
  88. PRIVATE MSEL,N,X
  89. if repeat                && prevents recurrsive calls
  90.    repeat = .F.
  91.    return
  92. else
  93.    repeat = .T.
  94.    save screen to prghlp
  95.    do while .T.
  96.       @ 0,0 clear
  97.         answer = space(1)
  98. **********************************************************************
  99. *   insert the version of clipper that you are using here            *
  100. **********************************************************************
  101.         @ 1,4 say "AUTUMN VERSION"
  102.       SET color to I
  103.       do h_center with 1, call_prg + ".PRG"
  104.       SET color to
  105.       @ 1,60 say "MEMORY: [" + ALLTRIM(STR(memory(0))) + "]"
  106.         msel = select()
  107.         n = msel
  108.         mdbf1 = space(1)
  109.         row = 6
  110.         do while n > 0
  111.         if len(trim(H_dbf())) > 0
  112.             do Hs_select with n
  113.             x = select()
  114.             @ row,60 say "Select "
  115.             @ row,col() say x
  116.             row = row+1
  117.             @ row,65 say H_dbf()
  118.             row = row+1
  119.             @ row,65 say "Record " +alltrim(str(recno()))
  120.             row = row+1
  121.             n = n-1
  122.          else
  123.             do Hs_select with n
  124.             n = n-1
  125.         endif
  126.         enddo    
  127.         do Hs_select with msel
  128.         @ 5,59 to row,78
  129.       head1 = "1. NORTON EDITOR           "
  130.         head2 = "2. DFLOW                   "
  131.         head3 = "3. DOCUMENTOR              "
  132.         head4 = "4. WHAT KEY                "
  133.         head5 = "5. NEWLY CHANGED PRG FILES "
  134.         head6 = "6. MODIFY DBF FILES        "
  135.         head7 = "7. EDIT RECORDS IN DBF FILE"
  136.         head8 = "8. CREATE A NEW DBF FILES  "
  137.         head9 = "9. COMPILE PROGRAM         "
  138.         head0 = "0. RETURN TO CLIPPER       "
  139.         Hnum_items = 10
  140.         HX = 7
  141.         HY = 23
  142.         HW = LEN(HEAD1)
  143.         DO H_F1 WITH "HELP"
  144.         @ 22,1 to 22,78 double
  145.       @ 0,0 TO 24,79 DOUBLE
  146.         @ 23,2 say "Use UP and DOWN arrows to highlight choice...Press ENTER to select"
  147.         do h_lightbar with Hnum_items,HX,HY,HW,head1,head2,head3,head4,head5,head6,head7,head8,head9,head0
  148.         choice = str(hselection,1)
  149.       do case
  150.       case answer = "Q"
  151.          clear
  152.         quit
  153.       case choice = "0"                && RETURNS TO CLIPPER
  154.          @ 0,0 clear
  155.          repeat = .F.
  156.          HELP_CODE = MHLP_CODE
  157.          restore screen from prghlp
  158.          return
  159.          
  160.          
  161.       case choice = "1"                && LOADS THE NORTON EDITOR
  162.          mfile = "NE.COM"
  163.             if .not. file(mfile)
  164.                 do hlp_mes with "YOU MUST HAVE THE NORTON EDITOR <NE.COM>"
  165.                 loop
  166.             endif        
  167.             mfile = space(15)
  168.          DO CLEARIT WITH 22,1,23,78
  169.          @ 22,1
  170.          accept "Enter name of file to edit..." to mfile
  171.          if len(trim(mfile)) = 0
  172.             mfile = call_prg + ".prg"
  173.             ! \ne + &mfile
  174.          else
  175.             X = AT(".",mfile)
  176.             if X = 0
  177.                mfile = mfile + ".prg"
  178.                ! \ne + &mfile
  179.             else
  180.                ! \ne + &mfile
  181.             endif
  182.          endif
  183.       case choice = "2"              && CALL DFLOW
  184.          mfile = "DFLOW.COM"
  185.             if .not. file(mfile)
  186.                 do hlp_mes with "YOU MUST HAVE WALLSOFT'S DFLOW  <DFLOW.COM>"
  187.                 loop
  188.             endif        
  189.             ! dflow
  190.          
  191.       case choice = "3"              && CALL THE DOCUMENTOR
  192.             mfile = "DOC.COM"
  193.             if .not. file(mfile)
  194.                 do hlp_mes with "YOU MUST HAVE WALLSOFT'S DOCUMENTOR  <DOC.COM>"
  195.                 loop
  196.             endif        
  197.          ! doc
  198.          
  199.          
  200.       case choice = "4"              && CHECK INKEY VALUES
  201.          do whatkey
  202.          
  203.       case choice = "5"              && MAKES A BAT FILE TO COMPILE NEW PRG'S
  204.          mfile = "DS.COM"
  205.             if .not. file(mfile)
  206.                 do hlp_mes with "YOU MUST HAVE NORTON UTILITIES  <DS.COM>"
  207.                 loop
  208.             endif        
  209.             do H_make
  210.          
  211.       case choice = "6"              && CHANGE A DBF FILE
  212.          do dbf_chng
  213.             
  214.       case choice = "7"              && EDIT A DBF FILE
  215.          do srd_edit
  216.  
  217.       case choice = "8"              && MAKE NEW DBF FILE
  218.          do dbf_make
  219.  
  220.       case choice = "9"                && COMPILE A SINGLE FILE
  221.          mfile = "CLIPPER.EXE"
  222.             if .not. file(mfile)
  223.                 do hlp_mes with "YOU MUST HAVE THE CLIPPER COMPILER  <CLIPPER.EXE>"
  224.                 loop
  225.             endif        
  226.             mfile = space(15)
  227.          DO CLEARIT WITH 22,1,23,78
  228.          @ 22,1
  229.          accept "Enter name of file to Compile... " to mfile
  230.          @ 0,0 clear
  231.          if len(trim(mfile)) = 0
  232.             mfile = call_prg + "-m"
  233.             ! clipper &mfile
  234.          else
  235.             mfile = mfile + "-m"
  236.             ! clipper &mfile
  237.          endif
  238.          wait
  239.       endcase
  240.    enddo
  241. endif
  242. ***********************************************************************
  243. **********************************************************************
  244. *  PROCEDURE TO MODIFY DATABASE STRUCTURE
  245.  
  246. procedure dbf_chng
  247. msel = select()
  248. n = msel
  249. mdbf1 = space(1)
  250. do while n > 0
  251.    if len(trim(H_dbf())) > 0
  252.       x = str(n,1)
  253.       mdbf&x = H_dbf()
  254.       mrec&x = recno()
  255.       n = n-1
  256.       select n
  257.    else
  258.       mdbf&x = space(1)
  259.       n = n-1
  260.       select n
  261.    endif
  262. enddo
  263. close databases
  264. clear gets
  265. do while .T.
  266.    do while .T.
  267.       @ 0,0 clear
  268.       mname = space(8)
  269.       @ 0,10
  270.       dir *.dbf
  271.       @ 20,35 say "Enter name of DBF file..." get mname picture "@!"
  272.       read
  273.       if len(trim(mname)) = 0
  274.          ?
  275.          do index_H
  276.          n = msel
  277.          do while n > 0
  278.             x = str(n,1)
  279.             if len(trim(mdbf&x)) > 0
  280.                select n
  281.                mdbf = mdbf&x
  282.                use &mdbf
  283.                mrec = mrec&x
  284.                goto mrec
  285.                n = n-1
  286.             else
  287.                n = n-1
  288.             endif
  289.          enddo
  290.          return
  291.       endif
  292.       mname = trim(mname)
  293.       first = mname + ".DBF"
  294.       if .not. file(first)
  295.          ? first + " not found"
  296.          WAIT
  297.          loop
  298.       else
  299.          exit
  300.       endif
  301.    enddo
  302.    use &mname
  303.    copy to teststru structure extended
  304.    use teststru
  305.    copy to testasci SDF
  306.    ! ne testasci.txt
  307.    @ 0,0 clear
  308.    do h_center with 12, "working..."
  309.    second = mname + ".BAK"
  310.    erase &second
  311.    rename &first to &second
  312.    use teststru
  313.    zap
  314.    append from testasci SDF
  315.    create &mname from teststru
  316.    append from &second
  317.    @ 0,0 clear
  318.    nnn = 1
  319.    for nnn = 1 to fcount()
  320.    ? fieldname(nnn)
  321.    next
  322.    close databases
  323.    erase &second
  324.    erase teststru.dbf
  325.    erase testasci.txt
  326. enddo
  327. **********************************************************************
  328. *   PROCEDURE TO CREAT A NEW DBF FILE
  329.  
  330. procedure dbf_make
  331. msel = select()
  332. clear gets
  333. do while .T.
  334.    do while .T.
  335.       @ 0,0 clear
  336.       mname = space(8)
  337.       @ 0,10
  338.       dir *.dbf
  339.       @ 20,35 say "Enter name of DBF file..." get mname picture "@!"
  340.       read
  341.       if len(trim(mname)) = 0
  342.          select msel
  343.          return
  344.       endif
  345.       mname = trim(mname)
  346.       first = mname + ".DBF"
  347.       if file(first)
  348.          ? first + " already exists"
  349.          WAIT
  350.          loop
  351.       else
  352.          exit
  353.       endif
  354.    enddo
  355.    create TEST1
  356.    list
  357.    *       select (0)
  358.    use TEST1
  359.    copy to teststru structure extended
  360.    use teststru
  361.    copy to testasci SDF
  362.    ! ne testasci.txt
  363.    @ 0,0 clear
  364.    do h_center with 12, "working..."
  365.    use teststru
  366.    zap
  367.    append from testasci SDF
  368.    create &mname from teststru
  369.    @ 0,0 clear
  370.    nnn = 1
  371.    for nnn = 1 to fcount()
  372.    ? fieldname(nnn)
  373.    IF nnn = 22
  374.       inkey(0)
  375.       @ 0,0 clear
  376.    endif
  377.    next
  378.    inkey(0)
  379.    @ 0,0 clear
  380.    answer = space(1)
  381.    @ 10,20 say "Do you want to add index files now?   " get answer Picture "!"
  382.    read
  383.    if answer = "Y"
  384.       use &mname
  385.       do while .T.
  386.          store space(8) to mindex
  387.          store space(10) to mfield
  388.          @ 10,20 say "Enter field to index on:"
  389.          @ 10,50 get mfield Picture "@!"
  390.          @ 11,20 say "Enter index name:"
  391.          @ 11,50 get mindex Picture "@!"
  392.          read
  393.          if len(trim(mindex)) = 0 .or. len(trim(mfield)) = 0
  394.             exit
  395.          else
  396.             index on &mfield to &mindex
  397.          endif
  398.       enddo
  399.    endif
  400.    close databases
  401.    erase test1.dbf
  402.    erase teststru.dbf
  403.    erase testasci.txt
  404. enddo
  405. **********************************************************************
  406. *   EDIT DBF RECORDS AND CHECK MEMORY VARIABLES
  407.  
  408. procedure srd_edit
  409. call cursw with "ON"
  410. do while .T.
  411.    @ 0,0 clear
  412.    head1 = "1. EDIT MEMVARS"
  413.     head2 = "2. EDIT RECORDS"
  414.     head3 = "3. EDIT NEW DBF"
  415.     head4 = "0. MAIN MEN    "
  416.     head5 = "XXXX"
  417.     head6 = "XXXX"
  418.     head7 = "XXXX"
  419.     head8 = "XXXX"
  420.     head9 = "XXXX"
  421.     head0 = "XXXX"
  422.     Hnum_items = 4
  423.     HX = 7
  424.     HY = 25
  425.     HW = LEN(HEAD1)
  426.     @ 22,1 to 22,78 double
  427.     @ 0,0 to 24,79 double
  428.     @ 23,2 say "Use UP and DOWN arrows to highlight choice...Press ENTER to select"
  429.     do h_lightbar with Hnum_items,HX,HY,HW,head1,head2,head3,head4,head5,head6,head7,head8,head9,head0
  430.     choice = str(hselection,1)
  431.    do case
  432.    case choice = "0"
  433.       return
  434.       
  435.    case choice = "1"
  436.       do while .T.
  437.          do clearit with 1,1,23,78
  438.          mvar = space (10)
  439.          @ 10,10 say "Enter the name of the memory variable: " get mvar Picture "@!"
  440.          read
  441.          @ 15,20 say "The memory variable " + mvar + " is: "
  442.          set color to I
  443.             @ 15,col() say &mvar
  444.             set color to
  445.             HMSG1 = "1. DO ANOTHER"
  446.             HMSG2 = "0. MENU      "
  447.             HMSG3 = "XXXX"
  448.             HMSG4 = "XXXX"
  449.             HMSG5 = "XXXX"
  450.             HMSG6 = "XXXX"
  451.             HMSG7 = "XXXX"
  452.             HMSG8 = "XXXX"
  453.             HMSG9 = "XXXX"
  454.             HMSG0 = "XXXX"
  455.             HNUM_ITEMS = 2
  456.             HX = 23
  457.             HY = 1
  458.             HW = LEN(HMSG1)
  459.             HMSTRING = "DM"
  460.             DO CLEARIT WITH X-1,Y,X,78
  461.             @ X-1,1 to x-1,78 double
  462.             DO HH_LIGHT WITH HNUM_ITEMS,HX,HY,HW,HMSG1,HMSG2,HMSG3,HMSG4,HMSG5,HMSG6,HMSG7,HMSG8,HMSG9,HMSG0,HMSTRING
  463.             CHOICE = STR(hselection,1)
  464.          if CHOICE = "0"
  465.             EXIT
  466.             endif
  467.       enddo
  468.       
  469.       
  470.    case choice = "2"
  471.         if reccount() = 0
  472.             ? "No records found"
  473.             inkey(6)
  474.             return
  475.         endif
  476.       mfirrec = recno()
  477.         msel = select()
  478.       n = msel
  479.         do while .T.
  480.             mexit = .F.
  481.          mdbf1 = space(1)
  482.          clear gets
  483.          mdelete = .F.
  484.          do while .T.
  485.             @ 0,0 clear
  486.             private x,y,z,n
  487.             n = 1
  488.             row = 1
  489.                 if eof()
  490.                     skip-1
  491.                 endif
  492.             do while .not. eof()
  493.                @ 1,0 say reccount()
  494.                @ 2,0 say recno()
  495.                for n = 1 to fcount()
  496.                     do case
  497.                     case n < 10
  498.                         x = str(n,1)
  499.                     case n < 100
  500.                         x = str(n,2)
  501.                     case n > 99
  502.                         x = str(n,3)
  503.                     endcase
  504.                mfield = fieldname(n)
  505.                @ row,10 say fieldname(n)
  506.                @ row,45 get &mfield
  507.                row = row+1
  508.                if row > 20
  509.                   read
  510.                   @ 0,0 clear
  511.                   row = 1
  512.                endif
  513.                next
  514.                read
  515.                row = 1
  516.                HMSG1 = "DELETE  "
  517.                     HMSG2 = "EDIT    "
  518.                     HMSG3 = "PREVIOUS"
  519.                     HMSG4 = "NEXT    "
  520.                     HMSG5 = "SELECT  "
  521.                     HMSG6 = "MENU    "
  522.                     HMSG7 = "XXXX"
  523.                     HMSG8 = "XXXX"
  524.                     HMSG9 = "XXXX"
  525.                     HMSG0 = "XXXX"
  526.                     HNUM_ITEMS = 6
  527.                     HX = 23
  528.                     HY = 1
  529.                     HW = LEN(HMSG1)
  530.                     HMSTRING = "DEPNSM"
  531.                     DO CLEARIT WITH X-1,Y,X,78
  532.                     @ X-1,1 to X-1,78 double
  533.                     DO HH_LIGHT WITH HNUM_ITEMS,HX,HY,HW,HMSG1,HMSG2,HMSG3,HMSG4,HMSG5,HMSG6,HMSG7,HMSG8,HMSG9,HMSG0,HMSTRING
  534.                     CHOICE = STR(hselection,1)
  535.                do case
  536.                case choice = "0"
  537.                   mexit = .T.
  538.                         exit
  539.                case upper(choice) = "1"
  540.                   delete
  541.                   mdelete = .T.
  542.                   skip
  543.                case upper(choice) = "4"
  544.                   skip
  545.                case Upper(choice) = "3"
  546.                   skip - 1
  547.                case choice = "5"
  548.                   n = select()
  549.                   @ 0,0 clear
  550.                   @ 8,10 say "present select area is : " + str(n,1)
  551.                   @ 10,10 say "Enter new select area: " get n 
  552.                   read
  553.                   do hs_select with n
  554.                         @ 12,10 say "New SELECT area is: "
  555.                   x = select()
  556.                   @ 12,col() say x
  557.                   @ 14,10 say "The DBF file is: "
  558.                   m_dbf = H_dbf()
  559.                   @ 14,col() say m_dbf
  560.                   inkey(8)
  561.                endcase
  562.                     
  563.                @ 0,0 clear
  564.                     if eof() .or. bof()
  565.                         @ 10,10 say "NO MORE RECORDS"
  566.                         INKEY(7)
  567.                         mexit = .T.
  568.                         EXIT
  569.                     endif
  570.             enddo
  571.                 
  572.             if mdelete
  573.                pack
  574.             endif
  575.                 do hs_select with msel
  576.                 goto mfirrec
  577.                 if mexit
  578.                     exit
  579.                 endif
  580.          enddo
  581.             if mexit
  582.                 exit
  583.             endif
  584.       enddo
  585.    case choice = "3"
  586.       msel = select()
  587.       n = msel
  588.       mdbf1 = space(1)
  589.       do while n > 0
  590.          if len(trim(H_dbf())) > 0
  591.             x = str(n,1)
  592.             mdbf&x = H_dbf()
  593.             mrec&x = recno()
  594.             n = n-1
  595.             select n
  596.          else
  597.             mdbf&x = space(1)
  598.             n = n-1
  599.             select n
  600.          endif
  601.       enddo
  602.       close databases
  603.       clear gets
  604.       mdelete = .F.
  605.       do while .T.
  606.          do while .T.
  607.             @ 0,0 clear
  608.             mname = space(8)
  609.             @ 0,10
  610.             dir *.dbf
  611.             @ 20,35 say "Enter name of DBF file..." get mname picture "@!"
  612.             read
  613.             if upper(trim(mname)) = "Q"
  614.                n = msel
  615.                do while n > 0
  616.                   x = str(n,1)
  617.                   if len(trim(mdbf&x)) > 0
  618.                      select n
  619.                      mdbf = mdbf&x
  620.                      use &mdbf
  621.                      mrec = mrec&x
  622.                      goto mrec
  623.                      n = n-1
  624.                   else
  625.                      n = n-1
  626.                   endif
  627.                enddo
  628.                return
  629.             endif
  630.             if len(trim(mname)) = 0
  631.                DO CLEARIT WITH 10,10,20,70
  632.                ANSWER = SPACE(1)
  633.                @ 14,20 SAY "DO YOU WISH TO REINDEX THE FILES (Y/N)..." GET ANSWER PICTURE "!"
  634.                @ 10,10 TO 20,70 DOUBLE
  635.                READ
  636.                IF ANSWER = "Y"
  637.                   do reindex_
  638.                   ?
  639.                   ? "reindexing..."
  640.                ENDIF
  641.                n = msel
  642.                do while n > 0
  643.                   x = str(n,1)
  644.                   if len(trim(mdbf&x)) > 0
  645.                      select n
  646.                      mdbf = mdbf&x
  647.                      use &mdbf
  648.                      goto mrec&x
  649.                      n = n-1
  650.                   else
  651.                      n = n-1
  652.                   endif
  653.                enddo
  654.                return
  655.             endif
  656.             mname = trim(mname)
  657.             first = mname + ".DBF"
  658.             if .not. file(first)
  659.                ? first + " not found"
  660.                WAIT
  661.                loop
  662.             else
  663.                exit
  664.             endif
  665.          enddo
  666.          @ 0,0 clear
  667.          use &mname
  668.          goto top
  669.          private x,y,z,n
  670.          n = 1
  671.          row = 1
  672.          do while .not. eof()
  673.             @ 1,0 say reccount()
  674.             @ 2,0 say recno()
  675.             for n = 1 to fcount()
  676.             x = iif(n > 10,str(n,1),str(n,2))
  677.             mfield = fieldname(n)
  678.             @ row,10 say fieldname(n)
  679.             @ row,45 get &mfield
  680.             row = row+1
  681.             if row > 20
  682.                read
  683.                @ 0,0 clear
  684.                row = 1
  685.             endif
  686.             next
  687.             read
  688.             row = 1
  689.             answer = space(1)
  690.             HMSG1 = "DELETE  "
  691.                 HMSG2 = "EDIT    "
  692.                 HMSG3 = "PREVIOUS"
  693.                 HMSG4 = "NEXT    "
  694.                 HMSG5 = "MENU    "
  695.                 HMSG6 = "XXXX"
  696.                 HMSG7 = "XXXX"
  697.                 HMSG8 = "XXXX"
  698.                 HMSG9 = "XXXX"
  699.                 HMSG0 = "XXXX"
  700.                 HNUM_ITEMS = 5
  701.                 HX = 23
  702.                 HY = 1
  703.                 HW = LEN(HMSG1)
  704.                 HMSTRING = "DEPNM"
  705.                 DO CLEARIT WITH X-1,Y,X,78
  706.                 @ X-1,1 to X-1,78 double
  707.                 DO HH_LIGHT WITH HNUM_ITEMS,HX,HY,HW,HMSG1,HMSG2,HMSG3,HMSG4,HMSG5,HMSG6,HMSG7,HMSG8,HMSG9,HMSG0,HMSTRING
  708.                 CHOICE = STR(hselection,1)
  709.             do case
  710.             case choice = "0"
  711.                exit
  712.             case upper(choice) = "D"
  713.                delete
  714.                mdelete = .T.
  715.                skip
  716.             case upper(choice) = "N"
  717.                skip
  718.             case Upper(choice) = "P"
  719.                skip - 1
  720.             endcase
  721.             @ 0,0 clear
  722.          enddo
  723.          if mdelete
  724.             pack
  725.          endif
  726.          use
  727.       enddo
  728.    endcase
  729. enddo
  730.  
  731.  
  732. **********************************************************************
  733. *   you must of course set this procedure up to make your indexes    *
  734. **********************************************************************
  735.  
  736.  
  737. procedure index_h
  738. DO WHILE .t.
  739.    @ 23,0 clear
  740.    @ 23,1
  741.    ?? "working..."
  742. **********************************************************************
  743. *   THIS HAS TO BE HARD-CODED BY YOU TO CREAT YOUR INDEX FILES       *
  744. **********************************************************************
  745.    use done.dbf
  746.     index on str(year(date1),4)+str(month(date1),2)+str(day(date1),2) to done1
  747.     index on str(year(date2),4)+str(month(date2),2)+str(day(date2),2) to done2
  748.     index on str(year(date3),4)+str(month(date3),2)+str(day(date3),2) to done3
  749.     use audio
  750.     index on title to a_title
  751.     index on lastname to a_artist
  752.     use
  753.    return
  754. enddo
  755. **********************************************************************
  756.  
  757. procedure reindex_
  758. do while .t.
  759.    ?? "working..."
  760.    use
  761. **********************************************************************
  762. *    YOU MUST OF COURSE SET THIS PROCEDURE UP TO REINDEX YOUR FILES  *
  763. **********************************************************************
  764.     use done.dbf
  765.     set index to done1, done2, done3
  766.     reindex
  767.     use audio
  768.     set index to  a_title, a_artist
  769.     reindex
  770.    use
  771.    RETURN
  772. ENDDO
  773. **********************************************************************
  774.  
  775.  
  776. procedure h_center
  777. Parameters row, string
  778. @ row,(78-len(string))/2 say string
  779. return
  780. **********************************************************************
  781.  
  782.  
  783. procedure h_choice
  784. Parameters INSTRUCTION, RANGE
  785. @ 22,1 to 22,78 double
  786. choice = " "
  787. do while .not. choice $ RANGE
  788.    @23,2
  789.    wait INSTRUCTION to choice
  790. enddo
  791. return
  792. **********************************************************************
  793. *                   WHATKEY                                          *
  794. **********************************************************************
  795. * PLEASE NOTE THAT THIS PROCEDURE WAS NOT WRITTEN BY ME. iT WAS TAKEN*
  796. * OFF OF THE CLIPPER SIG ON THE SOURCE.                              *
  797. **********************************************************************
  798. PROCEDURE WHATKEY
  799. @ 0,0 CLEAR
  800. toggle = 1                      && 1=Clipper INKEY()   0=PC keyboard
  801. do MBAN with "WHAT KEY"
  802. @ 8,2 SAY 'IBM PC Keyboard Output'
  803. @ 8,42 SAY 'Clipper INKEY() Function Output'
  804. @ 9,2 to 21,35
  805. @ 9,42 to 21,75
  806. @ 0,0 TO 24,79 DOUBLE
  807. @ 11,65 SAY 'Dec   Hex'                 && Fill Clipper box with prompts
  808. @ 13,45 SAY 'Clipper INKEY(): '
  809. @ 15,45 SAY 'Printed character: '
  810. @ 22,42 SAY '<Alt-T> to Toggle to IBM output'
  811. @ 23,42 SAY '<Alt-Q> to Quit'
  812. @ 15,65 SAY ''
  813. key = 0
  814. DO WHILE .NOT.((toggle=1.AND.key=272) .OR. (toggle=0.AND.key=4096)) && <Alt-Q>
  815.    key = 0
  816.    IF toggle = 1                   && Get/display Clipper key output
  817.       trash = INKEY(0)
  818.       key = LASTKEY()
  819.       IF  key>=0
  820.          hex_str = DECTOHEX(key)
  821.       ELSE
  822.          hex_str='    '
  823.       ENDIF
  824.       hex_str = SUBSTR('0000'+hex_str,LEN(hex_str)+1,4)
  825.       @ 13,62 SAY STR(key,6)+'  '+hex_str
  826.       @ 15,65 SAY CHR(key)
  827.    ELSE                            && Get/display PC key output
  828.       key = PCKEY()
  829.       hex_str = DECTOHEX(key)
  830.       hex_str = SUBSTR('0000'+hex_str,LEN(hex_str)+1,4)
  831.       @ 13,21 SAY STR(INT(key/256),6)+'    '+SUBSTR(hex_str,1,2)
  832.       @ 16,21 SAY STR(key%256,6)+'    '+SUBSTR(hex_str,3,2)
  833.       @ 19,25 SAY CHR(key%256)
  834.    ENDIF :toggle=1
  835.    
  836.    IF (toggle=1.AND.key=276) .OR. (toggle=0.AND.key = 5120) && <Alt-T>
  837.       trash = INKEY(1)                && Let user glimpse Alt-T toggle char output
  838.       toggle = 1 - toggle             && Toggle to other state, 1-to-0 or 0-to-1
  839.       IF toggle = 1
  840.          @ 9,2 to 21,35
  841.          @ 11,65 SAY 'Dec   Hex'         && and paint prompts in PC box
  842.          @ 13,45 SAY 'Clipper INKEY(): '
  843.          @ 15,45 SAY 'Printed character:  '
  844.          @ 22,0
  845.          @ 23,0
  846.          @ 22,42 SAY '<Alt-T> to Toggle to IBM output'
  847.          @ 23,42 SAY '<Alt-Q> to Quit'
  848.          @ 15,65 SAY ''
  849.       ELSE
  850.          @ 9,42,21,75 BOX empty_frame            && Blank the INKEY() box to show PC
  851.          @ 11,24 SAY 'Dec   Hex'         && and paint prompts in INKEY() box
  852.          @ 13,5 SAY 'Auxiliary byte: '
  853.          @ 14,6 SAY '(scan code)'
  854.          @ 16,5 SAY 'Main byte:      '
  855.          @ 17,6 SAY '(ASCII value)'
  856.          @ 19,5 SAY 'Printed character:  '
  857.          @ 22,0
  858.          @ 23,0
  859.          @ 22,2 SAY '<Alt-T> to Toggle to Clipper output'
  860.          @ 23,2 SAY '<Alt-Q> to Quit'
  861.          @ 19,25 SAY ''
  862.       ENDIF :toggle = 1
  863.    ENDIF :toggle.AND.key .OR. toggle.AND.key
  864. ENDDO :toggle.AND.key .OR. toggle.AND.key
  865. @ 22,0 CLEAR
  866. RETURN
  867.  
  868.  
  869. FUNCTION DECTOHEX
  870. *
  871. * Syntax: DECTOHEX(<expN>)
  872. * Return: <expC>, a string consisting of as many hexadecimal digits
  873. *          as required to represent in hex the value of the input
  874. *
  875. PRIVATE dec,hex_str,power,no_times
  876. PARAMETERS dec
  877. hex_str = ''
  878. power = 0
  879. DO WHILE INT( dec/(16^(power+1)) ) > 0          && find highest dividable
  880.    power = power + 1                               && power of 16
  881. ENDDO
  882. DO WHILE power >= 0                             && find how many of each
  883.    no_times = INT(dec/(16^power))
  884.    hex_str = hex_str + IF(no_times<10,CHR(48+no_times),CHR(55+no_times))
  885.    dec = dec - no_times * (16^power)
  886.    power = power - 1
  887. ENDDO
  888. RETURN(hex_str)
  889. **********************************************************************
  890.  
  891.  
  892. procedure MBAN
  893. Parameter BANNER
  894. clear
  895. @ 2,2 say cdow(date())
  896. @ 2,(78-len(banner))/2 say banner
  897. @ 2,78-len(cdate) say cdate
  898. @ 3,1 to 3,78 double
  899. return
  900. **********************************************************************
  901.  
  902. procedure Hs_select
  903. parameter sel_num
  904. do case
  905.                         case sel_num = 1
  906.                         select 1
  907.                         case sel_num = 2
  908.                         select 2
  909.                         case sel_num = 3
  910.                         select 3
  911.                         case sel_num = 4
  912.                         select 4
  913.                         case sel_num = 5 
  914.                         select 5
  915.                         case sel_num = 6
  916.                         select 6
  917.                         case sel_num= 7
  918.                         select 7
  919.                         case sel_num=8
  920.                         select 8
  921.                         case sel_num=9
  922.                         select 9
  923.                         endcase
  924. return
  925. **********************************************************************
  926. procedure h_lightbar
  927.   parameters Hitems,hx1,hy1,hwidth,hentry1,hentry2,hentry3,hentry4,hentry5,hentry6,hentry7,hentry8,hentry9,hentry10
  928.   answer = space(1)
  929.   store hx1 to hx1m
  930.   store hy1 to hy1m
  931.  
  932. CALL CURSW WITH "OFF"
  933.   * display menu and process the keys pressed *
  934.   set color to I
  935.   @ hx1m,hy1m to (hx1m+1+hitems),(hy1m+hwidth+1) double
  936.   set color to 
  937.  
  938.   * Enter menu lines to screen *
  939.   for hn=1 to Hitems                                               && FOR-NEXT LOOP
  940.           hnstring = iif(hn = 10,str(hn,2),str(hn,1))
  941.         hmenu_line = iif(hentry&hnstring = "XXXX",space(hwidth),hentry&hnstring)
  942.           @ hx1+hn,hy1+1 say hmenu_line  
  943.   next
  944.   hn=hx1+1
  945.   hk=1
  946.   hcontrol= .T.
  947.   do while hcontrol=.T.
  948.        hkstring = iif(hk = 10,str(hk,2),str(hk,1))
  949.    store hentry&hkstring to hmenu_line
  950.  
  951.     * display current inverse lightbar *
  952.     set color to I
  953.     @ hn,hy1+1 say upper(hmenu_line)
  954.      
  955.     * wait for key to be pressed *
  956.     hselection = 0
  957.     do while hselection=0
  958.       hselection=inkey()
  959.     enddo
  960.  
  961.     * redisplay hilite area back to normal *
  962.     if hselection<>13
  963.       set color to 
  964.       @ hn,hy1+1 say upper(hmenu_line)
  965.     endif
  966.  
  967.     do case
  968.       * Q was pressed *
  969.         case hselection = 113 .or. hselection = 81
  970.         answer = "Q"
  971.         exit
  972.         
  973.         * down arrow was pressed *
  974.       case hselection=24
  975.         hk=hk+1
  976.         hn=hn+1
  977.         if hk>items
  978.           hn=hx1+1
  979.           hk=1
  980.         endif
  981.           loop
  982.       * up arrow was pressed *
  983.       case hselection=5
  984.         hk=hk-1
  985.         hn=hn-1
  986.         if hk<1
  987.           hn=hx1+hitems
  988.           hk=hitems
  989.         endif
  990.           loop
  991.           
  992.           * Home or page up was pressed *
  993.         case hselection = 1 .or. hselection = 18
  994.         hk=1
  995.         hn=hx1+1
  996.         loop
  997.         
  998.         * End or page down was pressed *
  999.         case hselection = 6 .or. hselection = 3
  1000.         hk = hitems
  1001.         hn = hx1+hitems
  1002.         loop
  1003.         
  1004.         
  1005.         * F1 was pressed *
  1006.         case hselection = 28
  1007.         do help with A, B, C
  1008.         loop
  1009.         
  1010.         
  1011.       case hselection = 48               && 0 key pressed
  1012.             hk=0
  1013.             hcontrol=.F.
  1014.         loop
  1015.         
  1016.         case hselection = 49               && 1 key pressed
  1017.             hk=1
  1018.             hcontrol=.F.
  1019.         loop
  1020.           
  1021.         case hselection = 50               && 2 key pressed
  1022.             hk=2
  1023.             hcontrol=.F.
  1024.         loop
  1025.         
  1026.         case hselection = 51               && 3 key pressed
  1027.             IF 3 > hitems
  1028.                 loop
  1029.             endif
  1030.             hk=3
  1031.             hcontrol=.F.
  1032.         loop
  1033.         
  1034.         case hselection = 52               && 4 key pressed
  1035.             IF 4 > hitems
  1036.                 loop
  1037.             endif
  1038.             hk=4
  1039.             hcontrol=.F.
  1040.         loop
  1041.         
  1042.         case hselection = 53               && 5 key pressed
  1043.             IF 5 > hitems
  1044.                 loop
  1045.             endif
  1046.             hk=5
  1047.             hcontrol=.F.
  1048.         loop
  1049.         
  1050.         case hselection = 54               && 6 key pressed
  1051.             IF 6 > hitems
  1052.                 loop
  1053.             endif
  1054.             hk=6
  1055.             hcontrol=.F.
  1056.         loop
  1057.         
  1058.         case hselection = 55               && 7 key pressed
  1059.             IF 7 > hitems
  1060.                 loop
  1061.             endif
  1062.             hk=7
  1063.             hcontrol=.F.
  1064.         loop
  1065.         
  1066.         case hselection = 56               && 8 key pressed
  1067.             IF 8 > hitems
  1068.                 loop
  1069.             endif
  1070.             hk=8
  1071.             hcontrol=.F.
  1072.         loop
  1073.             
  1074.         case hselection = 57               && 9 key pressed
  1075.             IF 9 > hitems
  1076.                 loop
  1077.             endif
  1078.             hk=9
  1079.             hcontrol=.F.
  1080.         loop
  1081.         * <cr> was pressed *
  1082.       case hselection=13
  1083.         hcontrol=.F.
  1084.         loop
  1085.     endcase  
  1086.   enddo
  1087.   if hk >= hitems
  1088.         hselection = 0
  1089.   else
  1090.          hselection=hk
  1091.   endif
  1092.   * return video attributes to normal *
  1093.   set color to
  1094.   CALL CURSW WITH "ON"
  1095.   return
  1096.  
  1097.  
  1098. PROCEDURE HH_LIGHT
  1099.   parameters hitems,hx1,hy1,hwidth,hentry1,hentry2,hentry3,hentry4,hentry5,hentry6,hentry7,hentry8,hentry9,hentry10,hlstring
  1100.   answer = space(1)
  1101.   hwidth = hwidth + 4
  1102.   hmlength = hitems * hwidth
  1103.   hy1 = (78-hmlength)/2
  1104.   set color to
  1105.   * Enter menu lines to screen *
  1106.   CALL CURSW WITH "OFF"
  1107.   hN = 1
  1108.   DO WHILE hN <= hitems 
  1109.           hnstring = iif(hn = 10,str(hn,2),str(hn,1))
  1110.         hmenu_line = iif(hentry&hnstring = "XXXX",space(hwidth),hentry&hnstring)
  1111.           @ hx1,hy1+(hN*hWIDTH)-hwidth say hmenu_line  
  1112.         hN = hN + 1
  1113.   ENDDO
  1114.   hn=1
  1115.   hk=1
  1116.   hcontrol= .T.
  1117.   do while hcontrol
  1118.        hkstring = iif(hk = 10,str(hk,2),str(hk,1))
  1119.    store hentry&hkstring to hmenu_line
  1120.  
  1121.     * display current inverse lightbar *
  1122.     set color to I
  1123.     @ hX1,hy1+(hN*hwidth)-hwidth say trim(upper(hmenu_line))
  1124.      
  1125.     * wait for key to be pressed *
  1126.     hselection = 0
  1127.     do while hselection=0
  1128.       hselection=inkey()
  1129.     enddo
  1130.  
  1131.     * redisplay hilite area back to normal *
  1132.     if hselection<>13
  1133.       set color to
  1134.       @ hX1,hy1+(hN*hwidth)-hwidth say trim(upper(hmenu_line))
  1135.     endif
  1136.  
  1137.     do case
  1138.       * right arrow was pressed *
  1139.       case hselection=4
  1140.         hk=hk+1
  1141.         hn=hn+1
  1142.         if hk>hitems
  1143.           hn=1
  1144.           hk=1
  1145.         endif
  1146.           loop
  1147.       * left arrow was pressed *
  1148.       case hselection=19
  1149.         hk=hk-1
  1150.         hn=hn-1
  1151.         if hk<1
  1152.           hn=hitems
  1153.           hk=hitems
  1154.         endif
  1155.           loop
  1156.         
  1157.         * Home was pressed *
  1158.         case hselection = 1
  1159.         hk=1
  1160.         hn=1
  1161.         loop
  1162.         
  1163.         * End was pressed *
  1164.         case hselection = 6
  1165.         hk = hitems
  1166.         hn = hitems
  1167.         loop
  1168.         
  1169.         * F1 was pressed *
  1170.         case hselection = 28
  1171.         do help with A, B, C
  1172.         loop
  1173.         
  1174.       case hselection = 48               && 0 key pressed
  1175.             hk=0
  1176.             hcontrol=.F.
  1177.         loop
  1178.         
  1179.         case hselection = 49               && 1 key pressed
  1180.             hk=1
  1181.             hcontrol=.F.
  1182.         loop
  1183.           
  1184.         case hselection = 50               && 2 key pressed
  1185.             hk=2
  1186.             hcontrol=.F.
  1187.         loop
  1188.         
  1189.         case hselection = 51               && 3 key pressed
  1190.             IF 3 > hitems
  1191.                 loop
  1192.             endif
  1193.             hk=3
  1194.             hcontrol=.F.
  1195.         loop
  1196.         
  1197.         case hselection = 52               && 4 key pressed
  1198.             IF 4 > hitems
  1199.                 loop
  1200.             endif
  1201.             hk=4
  1202.             hcontrol=.F.
  1203.         loop
  1204.         
  1205.         case hselection = 53               && 5 key pressed
  1206.             IF 5 > hitems
  1207.                 loop
  1208.             endif
  1209.             hk=5
  1210.             hcontrol=.F.
  1211.         loop
  1212.         
  1213.         case hselection = 54               && 6 key pressed
  1214.             IF 6 > hitems
  1215.                 loop
  1216.             endif
  1217.             hk=6
  1218.             hcontrol=.F.
  1219.         loop
  1220.         
  1221.         case hselection = 55               && 7 key pressed
  1222.             IF 7 > hitems
  1223.                 loop
  1224.             endif
  1225.             hk=7
  1226.             hcontrol=.F.
  1227.         loop
  1228.         
  1229.         case hselection = 56               && 8 key pressed
  1230.             IF 8 > hitems
  1231.                 loop
  1232.             endif
  1233.             hk=8
  1234.             hcontrol=.F.
  1235.         loop
  1236.             
  1237.         case hselection = 57               && 9 key pressed
  1238.             IF 9 > hitems
  1239.                 loop
  1240.             endif
  1241.             hk=9
  1242.             hcontrol=.F.
  1243.         loop
  1244.         * <cr> was pressed *
  1245.       case hselection=13
  1246.         hcontrol=.F.
  1247.         loop
  1248.         
  1249.         case upper(chr(hselection)) $ hlstring
  1250.             hmpos = AT((upper(chr(hselection))),hlstring)
  1251.             hk = hmpos
  1252.             exit
  1253.  
  1254.     endcase  
  1255.   enddo
  1256.   if hk >= hitems
  1257.         hselection = 0
  1258.   else
  1259.          hselection=k
  1260.   endif
  1261.   * return video attributes to normal *
  1262.   set color to
  1263.   CALL CURSW WITH "ON"
  1264.   return
  1265. **********************************************************************
  1266.  
  1267. Procedure H_F1                           && help box
  1268.     parameter string
  1269.     private mlen
  1270.     string = "F1- " + string
  1271.     mlen = len(trim(string))
  1272.     @ 19,(37 - (mlen/2)) to 21,(42 + (mlen/2))
  1273.     set color to I
  1274.     @ 20,(39-(mlen/2)) say space(mlen+2)
  1275.     @ 20,(40-(mlen/2)) say string
  1276.     set color to
  1277. return
  1278. **********************************************************************
  1279.  
  1280. FUNCTION H_DBF
  1281. * Syntax: DBF()
  1282. * Return: The alias of the currently selected database.
  1283. * Note..: Supposed to return the name of the currently selected database file.
  1284. *
  1285. RETURN ALIAS()
  1286. **********************************************************************
  1287. *              H_MAKE                                                *
  1288. **********************************************************************
  1289. *This program will set up a BAT file for linking newly changed PRG files
  1290. PROCEDURE H_MAKE
  1291. @ 0,0 clear
  1292. do clearit with 1,1,23,78
  1293. mrunfile = space(8)
  1294. @ 10, 10 say "Enter the name of the Run File:" get mrunfile Picture "@!"
  1295. read
  1296. @ 0,0 to 24,79 double
  1297. do center with 13, "working..."
  1298. set console off
  1299. @ 15,20
  1300. ! ds d-t-
  1301. set console on
  1302. do clearit with 1,1,23,78
  1303. @ 0,0 to 24,79 double
  1304. do center with 20, "Creating temporary files..."
  1305. set console off
  1306. !dir >newtemp.txt
  1307. set console on
  1308. use
  1309. mfile = "linkfile.dbf"
  1310. if file(mfile)
  1311.     use linkfile.dbf
  1312. else
  1313.     create mm_lunk
  1314.     append blank
  1315.     replace field_name with "FILENAME"
  1316.     replace field_type with "C"
  1317.     replace field_len with 60
  1318.     replace field_dec with 0
  1319.     create lunk from mm_lunk
  1320.     use
  1321.     erase mm_lunk.dbf
  1322.     rename lunk.dbf to linkfile.dbf
  1323.     use linkfile.dbf
  1324. endif
  1325. zap
  1326. append from newtemp SDF
  1327. goto top
  1328. counter = 1
  1329. mfile = space(8)
  1330. do while .not. eof()
  1331.     if substr(filename,10,3) = "EXE" .and. substr(filename,1,8) = mrunfile
  1332.         counter = counter - 1
  1333.         exit
  1334.     else
  1335.         if substr(filename,10,3) = "PRG"
  1336.             x = iif(counter > 9, str(counter,2),str(counter,1))
  1337.             mfile&x = substr(filename,1,8)
  1338.             counter = counter + 1
  1339.         endif
  1340.     endif
  1341.     skip
  1342. enddo
  1343. if counter > 0
  1344.     do center with 20, "Creating batch file........"
  1345.     mmfile = "temp_lnk.dbf"
  1346.     if file(mmfile)
  1347.         use temp_lnk
  1348.     else
  1349.         
  1350.         create temp_lnk
  1351.         append blank
  1352.         replace field_name with "FILENAME"
  1353.         replace field_type with "C"
  1354.         replace field_len with 60
  1355.         replace field_dec with 0
  1356.         create mm_lnk from temp_lnk
  1357.         use 
  1358.         erase temp_lnk.dbf    
  1359.         rename mm_lnk.dbf to temp_lnk.dbf
  1360.         use temp_lnk
  1361.     endif
  1362.     zap
  1363.     err = "> err"
  1364.     for y = 1 to counter
  1365.         append blank
  1366.         x = iif(y > 9,str(y,2),str(y,1))
  1367.         replace filename with "If not errorlevel 1 clipper @" + mfile&x + " >  err" + x
  1368.     next
  1369.     append blank
  1370.     replace filename with "if not errorlevel 1 link @all.lnk"
  1371.     append blank
  1372.     copy to newfile sdf
  1373.     mfile = "new.bat"
  1374.     if file(mfile)
  1375.         erase new.bat
  1376.     endif
  1377.     rename newfile.txt to new.bat
  1378.     erase newfile.txt
  1379.     erase newtemp.txt
  1380.     use temp_lnk.dbf
  1381.     zap
  1382.     use linkfile.dbf
  1383.     zap
  1384.     use
  1385. endif
  1386. if counter > 0
  1387.     do clearit with 1,1,23,78
  1388.     do center with 5, "The file `NEW.BAT' has been created"
  1389.     row = 7
  1390.     type new.bat
  1391.     inkey(0)
  1392.     clear
  1393. else
  1394.     do center with 20, "No new PRG files have been created!..."
  1395.     @ 20,5 say "Enter any key to return to menu..."
  1396.     inkey(0)
  1397.     clear
  1398. endif
  1399. return
  1400.  
  1401. *********************************EOF********************************
  1402.  
  1403.