home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 117 / af117a.adf / archives / af117a1.lzx / Fiasco_2.2 / Databases / PictureDatabase / PicInfo.frx < prev    next >
Text File  |  2000-09-13  |  2KB  |  84 lines

  1. /* picinfo.frx
  2.  * Info and control requester for Fiasco picture database
  3.  * Copyright © 1996-1997 Nils Bandener
  4.  * $VER: picinfo_frx 6.3 (13.9.97)
  5.  */
  6.  
  7. Options Results
  8. Parse Arg num
  9.  
  10. scriptname = "PictureInfo"
  11. fiasco_port = address()
  12.  
  13. GetField "Name_" || num
  14. name = result
  15.  
  16. GetField "Width_" || num
  17. width = result
  18.  
  19. GetField "Height_" || num
  20. height = result
  21.  
  22. GetField "Colors_" || num
  23. colors = result
  24.  
  25. if name ~= "" then do
  26.  
  27.     /*
  28.      *  "__in_archive__" is a magic path component used
  29.      *  by ScanDir.rexx to seperate the dos path and the path
  30.      *  in an archive.
  31.      */
  32.  
  33.     archive = pos("/__in_archive__/", name)
  34.  
  35.     if archive ~= 0 then
  36.     do
  37.         RequestChoice '"Archive: ' || left(name, archive - 1) || '*nFile: ' || substr(name, archive + 16) || '*nWidth: ' || width || '*nHeight: ' || height || '*nColors: ' || colors || '"' '"Display|Display with VT|Copy File|Cancel" Title "Fiasco Picture Database"'
  38.     end
  39.     else
  40.     do
  41.         RequestChoice '"File: ' || name || '*nWidth: ' || width || '*nHeight: ' || height || '*nColors: ' || colors || '"' '"Display|Display with VT|Copy File|Cancel" Title "Fiasco Picture Database"'
  42.     end
  43.  
  44.     if result = 1 then
  45.     do
  46.         call display.frx num "multiview" "screen"
  47.     end
  48.     else if result = 2 then
  49.     do
  50.         call display.frx num "vt" " "
  51.     end
  52.     else if result = 3 then
  53.     do
  54.  
  55.         RequestFile '"" Title "Select path to copy to" Drawersonly Savemode Noicons ProjectRelative'
  56.         if rc == 0 then
  57.         do
  58.  
  59.             dest = result
  60.  
  61.             if right(dest,1) ~= ":" & right(dest,1) ~= "/" then
  62.             do
  63.                 dest = dest || "/"
  64.             end
  65.  
  66.             archive = pos("/__in_archive__/", name)
  67.  
  68.             if archive ~= 0 then
  69.             do
  70.                 arcname = left(name, archive - 1)
  71.                 nameinarc = substr(name, archive + 16)
  72.  
  73.                 Address Command 'lha e "' || arcname || '" "' || nameinarc || '" "' || dest || '"'
  74.  
  75.             end
  76.             else
  77.             do
  78.                 Address Command 'copy "' || name || '" "' || dest || '"'
  79.             end
  80.         end
  81.     end
  82. end
  83.  
  84.