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

  1. Resident >NIL: C:RequestFile PURE
  2. Resident >NIL: C:RequestChoice PURE
  3. Resident >NIL: C:List PURE
  4. Resident >NIL: C:Echo PURE
  5.  
  6. ; $VER: UnLZXer v1.2 (27.1.98) Richard Burke
  7.  
  8. lab beg        ;This starts the section labelled "beg"
  9. c:which unlzx all >ENV:l2zwlzxl2z    ;The path of LZX is found and stored
  10. if WARN                    ;If LZX cannot be found...
  11.     Requestchoice "UnLZX Error Message" "Can't find 'UnLZX' tool! *nSee docs for details!" "Quit"
  12.     skip end
  13. endif
  14.  
  15. lab File
  16. Requestfile >ENV:l2zFilel2z TITLE "Choose the file to decrunch" POSITIVE Decrunch PATTERN #?.(lha|lzh||lzx)
  17. if WARN
  18.     skip end
  19. endif
  20.  
  21. echo >env:l2zfl2z $l2zfilel2z            ;Get rid of quotation marks, and also create default path for next archive if converting more
  22. list >env:l2zfszl2z env:l2zfl2z LFORMAT=%L    ;Get size of path name
  23. if $l2zfszl2z EQ 1                                ;Full path not selected
  24.     RequestChoice > NIL: "! Error !" "Choose FULL path!*n(i.e. start with DEVICE listing)" "Try again"
  25.     skip File BACK
  26. endif
  27.  
  28. lab Drw
  29. Requestfile >ENV:l2zDrawerl2z TITLE "Choose the drawer to decrunch to" DRAWERSONLY POSITIVE Decrunch
  30. if WARN
  31.     skip mrfls
  32. endif
  33.  
  34. echo >env:l2zdl2z $l2zdrawerl2z            ;Get rid of quotation marks, and also create default path for next archive if converting more
  35. list >env:l2zdszl2z env:l2zdl2z LFORMAT=%L    ;Get size of path name
  36. if $l2zdszl2z EQ 1                ;Full path not selected
  37.     RequestChoice > NIL: "! Error !" "Choose FULL path!*n(i.e. start with DEVICE listing)" "Try again"
  38.     skip Drw BACK
  39. endif
  40.  
  41. lab ex
  42. "$l2zwlzxl2z" x -x -F $l2zFilel2z $l2zDrawerl2z        ;This is the command line where the file is de-archived
  43. if $RC NOT EQ 0                        ;RC is Return Code - the number returned when a program exits. 0 indicates everything went correctly
  44.     RequestChoice "! ERROR !" "An error occured when decompreesing the archive!" "Okay" >NIL:
  45. endif
  46.  
  47. lab MrFls
  48. RequestChoice >ENV:l2zMrl2z "More files to decrunch?" "Do you want to decrunch more LhA or LZX files?" "Yes" "No"
  49. if $l2zMrl2z EQ 0
  50.     skip end
  51. else
  52.     skip beg back
  53. endif
  54.  
  55. lab end
  56. echo "*ec"
  57. echo "                  *e[1;32m  Thank you for using"
  58. echo "                          *e[1;4;43mUnLZXer*e[0;m"
  59.  
  60. c:list >nil: ENV:l2z#?l2z TO T:l2ztmp LFORMAT "delete %S%S >NIL:*n"
  61. execute T:l2ztmp >nil:
  62. delete T:l2ztmp >nil:
  63.  
  64. quit