home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -readerstuff- / richard_burke / scripts / dmsmakerenk_v1.1 < prev    next >
Text File  |  1998-05-02  |  7KB  |  216 lines

  1. Resident >NIL: C:RequestChoice PURE
  2. Resident >NIL: C:RequestFile PURE
  3.  
  4. ; $VER: DMSMakerEnk v1.1 (21.4.97) 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.                         delete >nil: env:cr
  64.                         skip Dev BACK
  65.                 endif
  66.         RequestChoice >ENV:Mode1 "Crunch Mode" "Choose degree of crunching" "Best" "None" "Heavy1" "Heavy2" "Return to menu"
  67.                 if WARN
  68.                         skip Start BACK
  69.                 endif
  70.                 if $Mode1 EQ 1
  71.                         echo "BEST" >ENV:Mode
  72.                 endif
  73.                 if $Mode1 EQ 2
  74.                         echo "NONE" >ENV:Mode
  75.                 endif
  76.                 if $Mode1 EQ 3
  77.                         echo "HEAVY1" >ENV:Mode
  78.                 endif
  79.                 if $Mode1 EQ 4
  80.                         echo "HEAVY2" >ENV:Mode
  81.                 endif
  82.         RequestFile >ENV:CrSv TITLE "Save crunched file as..." ACCEPTPATTERN "#?.dms" FILE ".dms" POSITIVE "Save" NEGATIVE "Return to menu"
  83.                 if WARN
  84.                         skip Start BACK
  85.                 endif
  86.         RequestChoice >ENV:En "Encryption" "Do you wish to encrypt *nthe FILE when saving?" "Yes" "No" "Return to menu"
  87.                 if $En EQ 1
  88.                         echo "Type password:"
  89.                         set >NIL: Pass ?
  90.                         $DMS read $CrSv FROM $Cr CMODE $Mode ENCRYPT $Pass
  91.                         echo "File encrypted and crunched!"
  92.                         unset >NIL: Pass
  93.                 endif
  94.                 if $En EQ 0
  95.                         skip Start BACK
  96.                 endif
  97.                 if $En EQ 2
  98.                         $DMS read $CrSv FROM $Cr CMODE $Mode
  99.                         echo "File crunched!"
  100.                 endif
  101. endif
  102.  
  103. if $Choice EQ 2
  104.         lab Dec
  105.         RequestFile >ENV:De TITLE "Choose FILE to decrunch" ACCEPTPATTERN "#?.dms" POSITIVE "Decrunch" NEGATIVE "Return to menu"
  106.                 if WARN
  107.                         skip Start BACK
  108.                 endif
  109.                 if NOT EXISTS $De
  110.                         echo "FILE does not exist! Choose again!"
  111.                         delete >nil: env:de
  112.                         skip Dec BACK
  113.                 endif
  114.         lab DecDev
  115.         RequestFile >ENV:DeDev TITLE "Choose DEVICE to decrunch TO" DRAWERSONLY POSITIVE "Write" NEGATIVE "Return to menu"
  116.                 if WARN
  117.                         skip Start BACK
  118.                 endif
  119.                 if NOT EXISTS $DeDev
  120.                         echo "DEVICE does not exist! Choose again!"
  121.                         delete >nil: env:dedev
  122.                         skip DecDev BACK
  123.                 endif
  124.         lab DeEnk
  125.         RequestChoice >ENV:DeEnc "De-Encrypt" "Was FILE encrypted when saved? If unsure, read General Info on View -*nif it says ENCRYPTED, it's encrypted. If it doesn't, it's not." "Yes" "No" "View" "Return to menu"
  126.                 if $DeEnc EQ 0
  127.                         skip Start BACK
  128.                 endif
  129.                 if $DeEnc EQ 1
  130.                         echo "Type password:"
  131.                         set >NIL: Pas ?
  132.                         $DMS write $De TO $DeDev DECRYPT $Pas
  133.                         echo "File decrypted and decrunched!"
  134.                         unset >NIL: Pas
  135.                 endif
  136.                 if $DeEnc EQ 2
  137.                         $DMS write $De TO $DeDev
  138.                         echo "File decrunched!"
  139.                 endif
  140.                 if $DeEnc EQ 3
  141.                         $DMS view $De
  142.                         skip DeEnk BACK
  143.                 endif
  144. endif
  145.  
  146. if $Choice EQ 3
  147.         lab Rep
  148.         RequestFile >ENV:Re TITLE "Choose FILE to repack" ACCEPTPATTERN "#?.dms" POSITIVE "Repack" NEGATIVE "Return to menu" FILE ".dms"
  149.                 if WARN
  150.                         skip Start BACK
  151.                 endif
  152.                 if NOT EXISTS $Re
  153.                         echo "File does not exist! Choose again!"
  154.                         delete >nil: env:re
  155.                         skip Rep BACK
  156.                 endif
  157.         RequestChoice >ENV:Mode1 "Crunch Mode" "Choose degree of crunching" "Best" "None" "Heavy1" "Heavy2" "Return to menu"
  158.                 if WARN
  159.                         skip Start BACK
  160.                 endif
  161.                 if $Mode1 EQ 1
  162.                         echo "BEST" >ENV:Mode
  163.                 endif
  164.                 if $Mode1 EQ 2
  165.                         echo "NONE" >ENV:Mode
  166.                 endif
  167.                 if $Mode1 EQ 3
  168.                         echo "HEAVY1" >ENV:Mode
  169.                 endif
  170.                 if $Mode1 EQ 4
  171.                         echo "HEAVY2" >ENV:Mode
  172.                 endif
  173.         RequestFile >ENV:CrSv TITLE "Save repacked file as..." ACCEPTPATTERN "#?.dms" FILE ".dms" POSITIVE "Save" NEGATIVE "Return to menu"
  174.                 if WARN
  175.                         skip Start BACK
  176.                 endif
  177.         $DMS repack $Re TO $CrSv CMODE $Mode
  178.         echo "File repacked!"
  179. endif
  180.  
  181. if $Choice EQ 4
  182.         lab View
  183.         RequestFile >ENV:V TITLE "Choose DMS FILE to view" POSITIVE "View" NEGATIVE "Return to menu" ACCEPTPATTERN "#?.dms" FILE ".dms"
  184.                 if WARN
  185.                         skip Start BACK
  186.                 endif
  187.                 if NOT EXISTS $V
  188.                         echo "FILE does not exist! Choose again!"
  189.                         delete >nil: env:v
  190.                         skip View BACK
  191.                 endif
  192.                 $DMS view $V
  193. endif
  194.  
  195. if $Choice EQ 5
  196.         lab Test
  197.         RequestFile >ENV:Tst TITLE "Choose FILE to test" ACCEPTPATTERN "#?.DMS" POSITIVE "Test" NEGATIVE "Return to menu" FILE ".dms"
  198.                 if WARN
  199.                         skip Start BACK
  200.                 endif
  201.                 if NOT EXISTS $Tst
  202.                         echo "FILE does not exist! Choose again!"
  203.                         delete >nil: env:tst
  204.                         skip Test BACK
  205.                 endif
  206.                 $DMS test $Tst
  207. endif
  208.  
  209. if $Choice EQ 0
  210.         skip End
  211. endif
  212.  
  213. skip Start BACK
  214.  
  215. lab End
  216. quit