home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / opus / v4 / lzx-script / lzx.dopus
Text File  |  1977-12-31  |  3KB  |  102 lines

  1. /*
  2.  $VER: lzx.dopus 1.00 22-Feb-95
  3.  
  4.  Funktion: LZX Archiver. Mit Hilfe diese Progamms kann eine
  5.    erhebliche Steigerung des Auswertens der selectierten Eintraege
  6.    erreicht werden.
  7.    Quelledir: Wird hier etwas selectiert, so wird nur dieses archiviert.
  8.      Ist nichts selectiert, dann wird alles archiviert.
  9.    ZielDir: Ist hier ein File selectiert, und dies traegt auch noch den
  10.      Suffix des Archiver-Programms, dann erscheint der Filename mit im
  11.      DOpusrequest, wo das Ziel Archiv angegeben wird.
  12.  
  13.  Benoetigt werden:
  14.    rexxreqtools.library, rexxsupport.library
  15.    DOpus 4.0+ runing
  16.    temporaeres Dir "t:"
  17.    OS 2.0+
  18.    Pack-Programm: LZX
  19.  
  20.  Aufruf: RX LZX.DOPUS {p} ( als AmigaDos starten !! )
  21.          Quellpath mit oder ohne selectierten Files
  22.          Destpath mit oder ohne selectiertem File
  23.        - Outputwindow
  24.        - cd quelle
  25.  
  26.  Programmierer: Henryk Richter, Stephan Jantzen Ring 47, 18106 Rostock,
  27.                 basierend auf einem Script von Lutz Hanke
  28. */
  29. parse arg portname
  30.  
  31. if ~show('l','rexxreqtools.library') then do
  32.   if ~addlib('rexxreqtools.library',0,-30,37) then exit 20
  33. end
  34. if ~show('l','rexxsupport.library') then do
  35.   if ~addlib('rexxsupport.library',0,-30,34) then exit 20
  36. end
  37.  
  38. OPTIONS RESULTS
  39. ADDRESS value portname
  40.  
  41. suffix = '.lzx'
  42.  
  43. 'Status 3'
  44. active = RESULT
  45. inactive = active ^ 1
  46.  
  47. 'status 13' inactive
  48. path = result
  49. 'Getselectedfiles /' inactive
  50. if result ~= 'RESULT' then do
  51.   PARSE VAR result temp'/'result
  52.   if pos(upper(suffix),upper(temp)) > 0 then do
  53.     temp = left(temp,length(temp)-length(suffix))
  54.     path = path || temp
  55.   end
  56. end
  57.  
  58. getstring "'Bitte Namen des Archives eingeben'" path
  59. if rc = 1 then exit 20
  60. if result = '' then do
  61.   'request kein Name eingegeben'
  62.   exit 20
  63. end
  64. path = result
  65.  
  66. if pos(upper(suffix),upper(path)) > 0 then
  67.  path = left(path,length(path)-length(suffix))
  68.  
  69. path = '"' || path || suffix || '"'
  70.  
  71. select = 0                              /* es wurde etwas selectiert */
  72. selected = ""
  73.  
  74. 'Getselecteddirs /'                     /* dirs auslesen */
  75. if result ~= 'RESULT' then do
  76.   selectedd = result
  77.   DO WHILE selectedd ~= ''
  78.     PARSE VAR selectedd name'/'selectedd
  79.     selected = selected || '"' || name || '/#?" '
  80.   end
  81.   select = 1
  82. end
  83.  
  84. 'Getselectedfiles /'                    /* files auslesen */
  85. if result ~= 'RESULT' then do
  86.   selectedd = result
  87.   DO WHILE selectedd ~= ''
  88.     PARSE VAR selectedd name'/'selectedd
  89.     selected = selected || '"' || name || '" '
  90.   end
  91.   select = 1
  92. end
  93.  
  94. if select ~= 0 then                     /* selectiert */
  95.   address 'COMMAND' 'Lzx -r -a -e -3 -x -M10000  a' path selected
  96. else do                                 /* nichts selectiert */
  97.   'status 13' active
  98.   source = RESULT || #?
  99.   address 'COMMAND' 'Lzx -r -a -e -3 -x -M10000 a' path source
  100. end
  101. exit 0
  102.