home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / utilities / propage_pdraw / donsgenies / adproscripts.lha / PCDconvert.adpro < prev    next >
Encoding:
Text File  |  1994-07-23  |  1.4 KB  |  68 lines

  1. /* Program to run the PhotoCD converter from Xetec and load the resulting file */
  2. /* $VER: PCDconvert July 94 */
  3. call open("STDERR","ram:trace","W")
  4. trace r
  5.  
  6.  
  7. options results
  8. address "ADPro"
  9.  
  10. lformat "UNIVERSAL"
  11. sformat "IFF"
  12.  
  13. render_type
  14. colours = ADPro_result
  15. screen_type
  16. stype = ADPro_result
  17. gamma
  18. gammasetting = ADPro_result
  19.  
  20. getfile '"Select file ..."' "CD0:"
  21. if rc~=0 then do
  22.     okay1 "No file selected"
  23.     exit
  24.     end
  25.  
  26. filename = ADPro_result
  27.  
  28. getdir '"Select directory for temp file"'
  29. if rc=10 then exit
  30. directory = ADPro_Result
  31. filestring = "/temp.photo.24bit"
  32. if right(directory,1)=":" then filestring = "temp.photo.24bit"
  33. tempfile = directory||filestring
  34.  
  35. getnumber '"Set quality level"' 3 1 4
  36. if rc=10 then exit
  37. level=ADPRO_RESULT
  38.  
  39. address command
  40. delete '"'tempfile'"'
  41.  
  42. "PCDtoIFF -"level '"'filename'"' '"'tempfile'"'
  43.  
  44. address "ADPro"
  45. PAUSE 750
  46. waits=6 /* arbitrary timeout */
  47. if ~exists(tempfile) then do  /* frame not yet ready */
  48.     j = 0
  49.     do k = 1 to waits*10 /* ultimate timeout */
  50.         PAUSE 750  /* 15 secs */
  51.         if exists(tempfile) then leave k
  52.         j=j+1
  53.         if j = waits then do
  54.                     OKAYN '"Failure"' '"File from PCDtoIFF has not appeared"' '"Give up|Wait a bit longer"' 
  55.                     if rc~=0 then exit
  56.                     else j = 1
  57.                     end
  58.                 end
  59.                 
  60.             end
  61.  
  62. load "'"tempfile"'"
  63. execute
  64. ADPRO_DISPLAY
  65. exit
  66. end
  67.  
  68.