home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -readerstuff- / richard_burke / scripts / dmsmaker < prev    next >
Encoding:
Text File  |  1998-05-02  |  5.3 KB  |  179 lines

  1. Resident >NIL: C:RequestChoice PURE
  2. Resident >NIL: C:RequestFile PURE
  3.  
  4. ; $VER: DMSMaker v1.0 (11.7.96) Richard Burke
  5.  
  6. lab Start
  7. if EXISTS ENV:Choice
  8.         delete ENV:Choice >NIL:
  9. endif
  10.  
  11. if EXISTS ENV:Tst
  12.         delete ENV:Tst >NIL:
  13. endif
  14.  
  15. if EXISTS ENV:V
  16.         delete ENV:V >NIL:
  17. endif
  18.  
  19. if EXISTS ENV:Re
  20.         delete ENV:Re >NIL:
  21. endif
  22.  
  23. if EXISTS ENV:DMS
  24.         delete ENV:DMS >NIL:
  25. endif
  26.  
  27. if EXISTS ENV:De
  28.         delete ENV:De >NIL:
  29. endif
  30.  
  31. if EXISTS ENV:DeDev
  32.         delete ENV:DeVol >NIL:
  33. endif
  34.  
  35. if EXISTS ENV:Cr
  36.         delete ENV:Cr >NIL:
  37. endif
  38.  
  39. if EXISTS ENV:CrSv
  40.         delete ENV:CrSv  >NIL:
  41. endif
  42.  
  43. if EXISTS ENV:Mode
  44.         delete ENV:Mode >NIL:
  45. endif
  46.  
  47. if EXISTS ENV:Mode1
  48.         delete ENV:Mode1 >NIL:
  49. endif
  50.  
  51. which DMS all >ENV:DMS
  52.  
  53. RequestChoice >ENV:Choice "Welcome!" "Welcome to the DMSMaker! Choose an action" "Crunch" "Decrunch" "Repack" "View" "Test" "Quit"
  54.  
  55. if $Choice EQ 1
  56.         lab Dev
  57.         RequestFile >ENV:Cr DRAWERSONLY TITLE "Choose DEVICE to crunch" POSITIVE "Crunch" NEGATIVE "Return to menu"
  58.                 if WARN
  59.                         skip Start BACK
  60.                 endif
  61.                 if NOT EXISTS $Cr
  62.                         echo "DEVICE does not exist! Choose again!"
  63.                         skip Dev BACK
  64.                 endif
  65.         RequestChoice >ENV:Mode1 "Crunch Mode" "Choose degree of crunching" "Best" "None" "Heavy1" "Heavy2" "Return to menu"
  66.                 if WARN
  67.                         skip Start BACK
  68.                 endif
  69.                 if $Mode1 EQ 1
  70.                         echo "BEST" >ENV:Mode
  71.                 endif
  72.                 if $Mode1 EQ 2
  73.                         echo "NONE" >ENV:Mode
  74.                 endif
  75.                 if $Mode1 EQ 3
  76.                         echo "HEAVY1" >ENV:Mode
  77.                 endif
  78.                 if $Mode1 EQ 4
  79.                         echo "HEAVY2" >ENV:Mode
  80.                 endif
  81.         RequestFile >ENV:CrSv TITLE "Save crunched file as..." ACCEPTPATTERN "#?.dms" FILE ".dms" POSITIVE "Save" NEGATIVE "Return to menu"
  82.                 if WARN
  83.                         skip Start BACK
  84.                 endif
  85.         $DMS read $CrSv FROM $Cr CMODE $Mode
  86.         echo "File crunched!"
  87. endif
  88.  
  89. if $Choice EQ 2
  90.         lab Dec
  91.         RequestFile >ENV:De TITLE "Choose FILE to decrunch" ACCEPTPATTERN "#?.dms" POSITIVE "Decrunch" NEGATIVE "Return to menu"
  92.                 if WARN
  93.                         skip Start BACK
  94.                 endif
  95.                 if NOT EXISTS $De
  96.                         echo "FILE does not exist! Choose again!"
  97.                         skip Dec BACK
  98.                 endif
  99.         lab DecDev
  100.         RequestFile >ENV:DeDev TITLE "Choose DEVICE to decrunch TO" DRAWERSONLY POSITIVE "Write" NEGATIVE "Return to menu"
  101.                 if WARN
  102.                         skip Start BACK
  103.                 endif
  104.                 if NOT EXISTS $DeDev
  105.                         echo "DEVICE does not exist! Choose again!"
  106.                         skip DecDev BACK
  107.                 endif
  108.         $DMS write $De TO $DeDev
  109.         echo "File decrunched!"
  110. endif
  111.  
  112. if $Choice EQ 3
  113.         lab Rep
  114.         RequestFile >ENV:Re TITLE "Choose FILE to repack" ACCEPTPATTERN "#?.dms" POSITIVE "Repack" NEGATIVE "Return to menu" FILE ".dms"
  115.                 if WARN
  116.                         skip Start BACK
  117.                 endif
  118.                 if NOT EXISTS $Re
  119.                         echo "File does not exist! Choose again!"
  120.                         skip Rep BACK
  121.                 endif
  122.         RequestChoice >ENV:Mode1 "Crunch Mode" "Choose degree of crunching" "Best" "None" "Heavy1" "Heavy2" "Return to menu"
  123.                 if WARN
  124.                         skip Start BACK
  125.                 endif
  126.                 if $Mode1 EQ 1
  127.                         echo "BEST" >ENV:Mode
  128.                 endif
  129.                 if $Mode1 EQ 2
  130.                         echo "NONE" >ENV:Mode
  131.                 endif
  132.                 if $Mode1 EQ 3
  133.                         echo "HEAVY1" >ENV:Mode
  134.                 endif
  135.                 if $Mode1 EQ 4
  136.                         echo "HEAVY2" >ENV:Mode
  137.                 endif
  138.         RequestFile >ENV:CrSv TITLE "Save repacked file as..." ACCEPTPATTERN "#?.dms" FILE ".dms" POSITIVE "Save" NEGATIVE "Return to menu"
  139.                 if WARN
  140.                         skip Start BACK
  141.                 endif
  142.         $DMS repack $Re TO $CrSv CMODE $Mode
  143.         echo "File repacked!"
  144. endif
  145.  
  146. if $Choice EQ 4
  147.         lab View
  148.         RequestFile >ENV:V TITLE "Choose DMS FILE to view" POSITIVE "View" NEGATIVE "Return to menu" ACCEPTPATTERN "#?.dms" FILE ".dms"
  149.                 if WARN
  150.                         skip Start BACK
  151.                 endif
  152.                 if NOT EXISTS $V
  153.                         echo "FILE does not exist! Choose again!"
  154.                         skip View BACK
  155.                 endif
  156.                 $DMS view $V
  157. endif
  158.  
  159. if $Choice EQ 5
  160.         lab Test
  161.         RequestFile >ENV:Tst TITLE "Choose FILE to test" ACCEPTPATTERN "#?.DMS" POSITIVE "Test" NEGATIVE "Return to menu" FILE ".dms"
  162.                 if WARN
  163.                         skip Start BACK
  164.                 endif
  165.                 if NOT EXISTS $Tst
  166.                         echo "FILE does not exist! Choose again!"
  167.                         skip Test BACK
  168.                 endif
  169.                 $DMS test $Tst
  170. endif
  171.  
  172. if $Choice EQ 0
  173.         skip End
  174. endif
  175.  
  176. skip Start BACK
  177.  
  178. lab End
  179. quit