home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dedit.zip / DEDIT.PRG < prev    next >
Text File  |  1986-06-26  |  7KB  |  287 lines

  1. CLEAR
  2. SET TALK OFF
  3. Store "Tex-a-Caid RBBS (512) 465-4690 Presents..." TO anline
  4. Store 8 to mline
  5. Store 60 to scol
  6. STORE LEN(anline) TO mlen
  7. STORE mlen TO mstart
  8. DO WHILE mstart > 0
  9.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  10.   STORE mstart - 1 TO mstart
  11. ENDDO
  12. STORE " " TO mspace
  13. STORE 1 TO mcount
  14. DO WHILE mcount < scol
  15.   IF mcount > scol-mlen
  16.     EXIT
  17.   ENDIF
  18.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  19.   STORE mspace + " " TO mspace
  20.   STORE mcount + 1 TO mcount
  21. ENDDO
  22. SET TALK OFF
  23. Store " Dedit & Utilities, A Clippered External Editor for DBF Files." TO anline
  24. Store 10 to mline
  25. Store 70 to scol
  26. STORE LEN(anline) TO mlen
  27. STORE mlen TO mstart
  28. DO WHILE mstart > 0
  29.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  30.   STORE mstart - 1 TO mstart
  31. ENDDO
  32. STORE " " TO mspace
  33. STORE 1 TO mcount
  34. DO WHILE mcount < scol
  35.   IF mcount > scol-mlen
  36.     EXIT
  37.   ENDIF
  38.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  39.   STORE mspace + " " TO mspace
  40.   STORE mcount + 1 TO mcount
  41. ENDDO
  42. SET TALK OFF
  43. Store " Create .DBF Files, Edit .DBF Files, List Contents of .DBF Files" TO anline
  44. Store 12 to mline
  45. Store 71 to scol
  46. STORE LEN(anline) TO mlen
  47. STORE mlen TO mstart
  48. DO WHILE mstart > 0
  49.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  50.   STORE mstart - 1 TO mstart
  51. ENDDO
  52. STORE " " TO mspace
  53. STORE 1 TO mcount
  54. DO WHILE mcount < scol
  55.   IF mcount > scol-mlen
  56.     EXIT
  57.   ENDIF
  58.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  59.   STORE mspace + " " TO mspace
  60.   STORE mcount + 1 TO mcount
  61. ENDDO
  62. SET TALK OFF
  63. Store "This Program incorporates a number of PD dBase routines, and is offered" TO anline
  64. Store 14 to mline
  65. Store 74 to scol
  66. STORE LEN(anline) TO mlen
  67. STORE mlen TO mstart
  68. DO WHILE mstart > 0
  69.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  70.   STORE mstart - 1 TO mstart
  71. ENDDO
  72. STORE " " TO mspace
  73. STORE 1 TO mcount
  74. DO WHILE mcount < scol
  75.   IF mcount > scol-mlen
  76.     EXIT
  77.   ENDIF
  78.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  79.   STORE mspace + " " TO mspace
  80.   STORE mcount + 1 TO mcount
  81. ENDDO
  82. SET TALK OFF
  83. Store "Free of Charge and restriction.  The combined source code is available" TO anline
  84. Store 16 to mline
  85. Store 73 to scol
  86. STORE LEN(anline) TO mlen
  87. STORE mlen TO mstart
  88. DO WHILE mstart > 0
  89.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  90.   STORE mstart - 1 TO mstart
  91. ENDDO
  92. STORE " " TO mspace
  93. STORE 1 TO mcount
  94. DO WHILE mcount < scol
  95.   IF mcount > scol-mlen
  96.     EXIT
  97.   ENDIF
  98.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  99.   STORE mspace + " " TO mspace
  100.   STORE mcount + 1 TO mcount
  101. ENDDO
  102. SET TALK OFF
  103. Store "For Downloading from TEX-A-CAID.  24 Hours a Day 7 Days a Week" TO anline
  104. Store 18 to mline
  105. Store 68 to scol
  106. STORE LEN(anline) TO mlen
  107. STORE mlen TO mstart
  108. DO WHILE mstart > 0
  109.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  110.   STORE mstart - 1 TO mstart
  111. ENDDO
  112. STORE " " TO mspace
  113. STORE 1 TO mcount
  114. DO WHILE mcount < scol
  115.   IF mcount > scol-mlen
  116.     EXIT
  117.   ENDIF
  118.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  119.   STORE mspace + " " TO mspace
  120.   STORE mcount + 1 TO mcount
  121. ENDDO
  122. SET TALK OFF
  123. Store "Jim Westbrook & Warren Watford Co-Sysops" TO anline
  124. Store 20 to mline
  125. Store 59 to scol
  126. STORE LEN(anline) TO mlen
  127. STORE mlen TO mstart
  128. DO WHILE mstart > 0
  129.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  130.   STORE mstart - 1 TO mstart
  131. ENDDO
  132. STORE " " TO mspace
  133. STORE 1 TO mcount
  134. DO WHILE mcount < scol
  135.   IF mcount > scol-mlen
  136.     EXIT
  137.   ENDIF
  138.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  139.   STORE mspace + " " TO mspace
  140.   STORE mcount + 1 TO mcount
  141. ENDDO
  142. SET TALK OFF
  143. Store "                                          " TO anline
  144. Store 22 to mline
  145. Store 60 to scol
  146. STORE LEN(anline) TO mlen
  147. STORE mlen TO mstart
  148. DO WHILE mstart > 0
  149.   @ mline-1,0 SAY SUBSTR(anline,mstart)
  150.   STORE mstart - 1 TO mstart
  151. ENDDO
  152. STORE " " TO mspace
  153. STORE 1 TO mcount
  154. DO WHILE mcount < scol
  155.   IF mcount > scol-mlen
  156.     EXIT
  157.   ENDIF
  158.   @ mline-1,0 SAY mspace + SUBSTR(anline,1,mlen)
  159.   STORE mspace + " " TO mspace
  160.   STORE mcount + 1 TO mcount
  161. ENDDO
  162. wait
  163. DO WHILE .T.
  164. CLEAR
  165. SET TALK OFF
  166. SET ESCAPE OFF
  167. SET PROCEDURE TO menprc
  168. Rev_Scrn = Space(8)
  169. Norm_Scrn = Space(8)
  170. message1='[1]    Edit Existing DBF'
  171. command1='do edit.prg'
  172. help1='Field Editor for DBF '
  173. message2='[2]    Directory Listing'
  174. command2='do dir.prg'
  175. help2='Lists Contents of the Current Directory'
  176. message3='[3]    List Records in Selected DBF'
  177. command3='do lister.prg'
  178. help3='List the Contents of a DBF'
  179. message4='[4]    Create a New DBF'
  180. command4='do creator.prg'
  181. help4='Create a New DBF'
  182.  
  183. bar=REPLICATE(CHR(205),78)
  184. u_bar=REPLICATE(CHR(196),78)
  185. a= DATE()
  186. message0='[0]   Quit to DOS'
  187. help0='Exit Program and Return to DOS'
  188. normal = 'W/N'
  189. reverse = 'N/W'
  190.  
  191. up_arrow       =5
  192. down_arrow     =24
  193. space_bar      =32
  194. car_return     =13
  195. min_choice     =47
  196. max_choice     = 52
  197. cdate = CMONTH(a) + STR(DAY(a),3) + ','+ STR(YEAR(a),5)
  198. hdrmessage = ' '
  199. max_count= 4
  200. hdrmessage='External Editior for DBF Files'
  201. counter = 1
  202. new_counter = 1
  203. *** START MAIN PROGRAM
  204.    
  205. SET COLOR TO &normal
  206.    
  207. CLEAR
  208.    
  209. DO banner WITH hdrmessage
  210. @  7,30 SAY message1
  211. @  8,30 SAY message2
  212. @  9,30 SAY message3
  213. @  10,30 SAY message4
  214. @ 15,30 SAY message0
  215. @ 22,3 SAY '     Press Arrow Keys To Move Highlighted Bar [Enter] To Select'
  216. @ 23,3 SAY '             Or Press Number Indicating Your Selection         '
  217. SET COLOR TO &reverse
  218. @ 7,30 SAY message1
  219. SET COLOR TO &normal
  220. DO WHILE .T.
  221.    selection = 0
  222.    DO WHILE selection = 0
  223.       selection = INKEY()
  224.    ENDDO
  225.    DO CASE
  226.       CASE (selection = up_arrow)
  227.          new_counter = counter - 1 
  228.       CASE (selection = space_bar .OR. selection = down_arrow)
  229.          new_counter = counter + 1
  230.       CASE (selection = car_return)
  231.          exit
  232.       CASE (selection >= min_choice .AND. selection <= max_choice)
  233.          counter = selection - 48
  234.          exit
  235.    ENDCASE
  236.    IF new_counter > max_count
  237.       new_counter = 0
  238.    ENDIF
  239.    IF new_counter < 0
  240.       new_counter = 1
  241.    ENDIF
  242.    SET COLOR TO &normal
  243.    oldmessage = 'message'+STR(counter,1)
  244.    IF counter <> 0
  245.       @ counter+6,30 SAY &oldmessage
  246.       @ 23,0
  247.    ELSE
  248.       @ 15,30 SAY &oldmessage
  249.    ENDIF
  250.    SET COLOR TO &reverse
  251.    message = 'message' + STR(new_counter,1)
  252.    IF new_counter <> 0
  253.       @new_counter+6,30 SAY &message
  254.    ELSE
  255.       @ 15,30 SAY &message
  256.    ENDIF
  257.    
  258.    Mhelp = 'help' + STR(new_counter,1)
  259.    @ 22,1
  260.    @ 22,3 SAY &Mhelp
  261.    counter = new_counter
  262.    
  263. ENDDO
  264.    
  265. mprogram = 'program'+STR(counter,1)
  266. SET COLOR TO &normal
  267. DO CASE
  268.    CASE counter = 1
  269.       do edit.prg
  270.   
  271.  CASE counter = 2
  272.      do dir.prg
  273.  
  274.    CASE counter = 3
  275.      do lister.prg
  276.  
  277.    CASE counter = 4
  278.      do creator.prg
  279.  
  280.    CASE counter = 0
  281. SET COLOR TO &normal
  282. @ 0,0 clear
  283.       Quit
  284. ENDCASE
  285. SET COLOR TO &normal
  286. ENDDO [WHILE .T.]
  287.