home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / MAXIMUS / CDCAR_13.ZIP / CDMENU.CMD < prev    next >
OS/2 REXX Batch file  |  1994-02-18  |  5KB  |  133 lines

  1. /*                         CD Carousel Door                                */  
  2. /*                              v1.3                                       */  
  3. /*                         by Bill Esposito                                */  
  4. /*                       The Cereal Port BBS                               */
  5. /*                            1:132/152                                    */
  6. /*                           (603)899-3335                                 */
  7. /*                                                                         */
  8. /*                         Magic name 'CDCAR'                              */
  9. /*                         for latest version                              */
  10. /*                                                                         */
  11. /* *********************************************************************** */
  12. /* DISCLAIMER:  This software is provided "AS IS" without any warranty of  */
  13. /* any kind, either expressed or implied.  USE IT AT YOUR OWN RISK.        */
  14. /*                                                                         */
  15. /* Copyright 1993 by Bill Esposito.  This program is SHAREWARE.    Please  */
  16. /* read the file SHAREWRE.TXT included in this archive.                    */
  17. /* *********************************************************************** */
  18. /*                     *****  CDMENU.CMD  *****                            */
  19. /* The CD Carousel Menu program.                                           */
  20. /***************************************************************************/
  21. config=cdcar.cfg
  22. ver='v1.3'
  23. f=1
  24. do until lines(config)=0
  25.   param.f=linein(config)
  26.   f=f+1
  27. end
  28. ok=stream(config,c,'close')
  29. parse var param.1 default junk
  30. parse var param.3 homedir junk
  31. parse var param.5 download junk
  32. parse var param.6 fnum junk
  33. parse var param.7 type junk
  34. parse var param.8 marea junk
  35. parse var param.9 tnode junk
  36. parse var param.10 fnode junk
  37. parse var param.11 sysopfirst sysoplast junk
  38. yel=''
  39. cyan=''
  40. brt=''
  41. call RxFuncAdd 'SysloadFuncs','RexxUtil','Sysloadfuncs'
  42. call sysloadfuncs
  43. menu:
  44. say 'HOS/2OS/2OS/2OS/2OS/2'     
  45. say '1HOS/2OS/2OS/2OS/2OS/2OS/2OS'
  46. say '7H/2OS/2OS/2OS/2OS/2OS/2OS/2OS'
  47. say '5H/2OS/2HS   0HOH/0HSH20H'
  48. say '0H/HO0HCD Carousel Door0H2H'
  49. say 'HS5H'ver'0HOH/1H 4H    '    
  50. say '0HBy Bill Esposito   0HSH29H**'     
  51. say '2HUNREGISTERED5H**0H/HO9H'
  52. say '9H                 0H21HS3H'               
  53. say '11H                            40H  80HO'
  54. say '1H/30HSet-up new cd80HS'  
  55. say '1H225H                              80H/'
  56. say '1HO30HFill file requests80H2'  
  57. say '1HS27H                          80H'
  58. say '80HO1H/28H 30HLocal '
  59. say '36HCD Carousel48H 80HS1H2'
  60. say '28H                           80H/1HO'
  61. say '30HReview error log80H21HS'  
  62. say '26H                      80HO1H/'   
  63. say '30HQuit     49H 80HS1H2'
  64. say '31H           80H/1HO30HSelect:80H2'
  65. say '1HS80HO1H/2OS/2OS/2OS/2OS/2'   
  66. say '19HOS/2OS/2OS/2OS/2OS/2OS/2O'
  67. say '44HS/2OS/2OS/2OS/2OS/2OS/2OS/2'
  68. say '71HOS/2OS/2OS1H'                               
  69. call syscurpos 20, 36
  70. pull select
  71. if select='S' then call cdconvrt.cmd 1
  72. if select='F' then call cdmaint.cmd 1
  73. if select='L' then call cdcar homedir 1 1 sysopfirst sysoplast 
  74. if select='R' then call errors
  75. if select='Q' then call quit
  76. if select<>'S' then if select<>'F' then if select<>'L' then if select<>'Q' then call menu
  77. quit:
  78. exit
  79.  
  80. errors:
  81. /* Read */
  82.  
  83. read: 
  84. file=homedir'errors.log'
  85. ok=stream(file,c,'close')
  86. call sysfiletree file, 'err.', 'F'
  87. if err.0=0 then call qdel
  88. x=1
  89. loop:
  90. y='1'
  91. linein(file,1,0)
  92. '@cls'
  93. loop2:
  94. do until x > 23
  95. say ''linein(file)''
  96. if lines(file)=''0'' then call qdel
  97. /*  say 'Press the <ENTER> key to continue'
  98.   pull enter
  99.   call qdel
  100. end     */
  101. x=x+y
  102. end
  103. more:
  104.   x=1
  105.    say 'more? (Y,n)'
  106.     pull yn
  107.     if yn='N' then call qdel
  108.      else
  109. call loop2
  110. call qdel
  111. qdel:
  112. ok=stream(file,c,'close')
  113. if err.0=1 then do
  114.   say
  115.   say brt||yel'Do you want to delete the Error Log? (y,N)'cyan
  116.   pull yn
  117.   if yn='Y' then del file
  118. end
  119. if err.0=0 then do
  120.   '@cls'
  121.   say
  122.   say brt||yel'There are no errors reported.' 
  123.   say 'Press <ENTER> to continue.'
  124.   pull yn
  125. end  
  126. call menu
  127. more1:
  128. say 'more? (Y,n)'
  129. pull yn
  130. if yn='N' then call menu
  131.  
  132.  
  133.