home *** CD-ROM | disk | FTP | other *** search
/ Dream 51 / Amiga_Dream_51.iso / Atari / Desktops / nodsk302.lzh / SCRIPTE / ZIPSHOW.NDS < prev   
Text File  |  1995-01-23  |  1KB  |  85 lines

  1. set ignoreerr
  2. set ignorebrk
  3.  
  4. #
  5. #    Zielpfad und -datei suchen und erstellen
  6. #
  7.  
  8. set cdir  = ▌
  9.  
  10. set path  = $2:t:r
  11. set path  = $TEMPDIR\$path
  12. set pnum  = 0
  13.  
  14. while (-e $path.$pnum)
  15.     set pnum @ $pnum + 1 
  16. wend
  17.  
  18. set path  = $path.$pnum
  19. set file  = $path\$3
  20.  
  21. mkdir $path
  22.  
  23. cd $path
  24.  
  25. #
  26. #    optionaler Bildertreiber
  27. #
  28.  
  29. set t = $3:r
  30.  
  31. if ("x"$3 != "x"$t) then
  32.     set type = $3:e
  33.     set pdrv = $SYSDIR\$type.NDT
  34.     if (! -e $pdrv)    unset pdrv
  35. endif
  36.  
  37. #
  38. #    Datei entarcen
  39. #
  40.  
  41. packerzip -x $2 $3 
  42.  
  43. #
  44. #    Warte auf Datei!
  45. #
  46. if ( $?multitask) then
  47.     set i = 0
  48.     while ( ( ! -e $file ) .or. ( -z $file ) )
  49.         sleep 1
  50.         set i @ $i+1
  51.         if ( $i .ge. 4) then
  52.             gecho -H'Fehler beim Entpacken' 'Script wird abgebrochen'
  53.             rm -nRY $path
  54.             unset ignoreerr
  55.             unset ignorebrk
  56.             return
  57.         endif
  58.     wend
  59. endif
  60.  
  61. #
  62. #    Terminalfenster schlie₧en
  63. #
  64.  
  65. w_close -NWCON1
  66.  
  67. #
  68. #    Bild-/Text-/Dump-Fenster öffnen
  69. #
  70.  
  71. if ($1 == 1) then
  72.     if ($?pdrv) then
  73.         wpic  -t$pdrv -P$wpicpos -X"rm -nRY $path" $file
  74.     else
  75.         wview -P$wtextpos -X"rm -nRY $path" $file
  76.     endif
  77. else
  78.     wdump -P$wtextpos -X"rm -nRY $path" $file
  79. endif
  80.  
  81. cd $cdir
  82.  
  83. unset ignoreerr
  84. unset ignorebrk
  85.