home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / gfx / ghostscript / ghostview.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-09-20  |  1.2 KB  |  50 lines

  1. /* A talkrequest.rx for use with KS 3.0+, but without rexxreqtools.library */
  2. /* Fixed by JanusMan on #amiga ~11/28/94 */
  3. /* Fixed sommore by BRG based on ideas from Andreas S. Oesterhelt 12/08/94 */
  4. /* Fixed a minor bug that caused it to fail.  --BRG 04/20/95 */
  5.  
  6. NL = '0a'x
  7. SIGNAL ON ERROR
  8.  
  9. PARSE ARG file modus
  10.  
  11.  
  12. address command
  13. ':C/LoadLib :SYS/libs/ixemul.library'
  14. 'Assign ghostscript: :Pearls/gfx/ghostscript'
  15.  
  16. if file=="" then do
  17.     failat 21
  18.     'RequestFile >t:ans TITLE "Postscript-Datei wählen" PATTERN "#?.ps"'
  19.     call open(answer,"t:ans","R")
  20.     file=readln(answer)
  21.     call close(answer)
  22. end
  23.  
  24. if modus="" then do
  25.     'RequestChoice >t:ans "GhostView" "Anzeige wählen" "Fenster" "High" "Low" "Super" "A2024" "ABBRUCH"'
  26.     call open(ans,"t:ans","R")
  27.     wert=readln(ans)
  28.     select
  29.         when wert=="0" then exit
  30.         when wert=="1" then modus=""
  31.         when wert=="2" then modus="_high"
  32.         when wert=="3" then modus="_low"
  33.         when wert=="4" then modus="_super"
  34.         when wert=="5" then modus="_a2024"
  35.         otherwise exit
  36.     end
  37.     call close(ans)
  38. end
  39. else modus='_'||word(modus,1)
  40.  
  41. if modus=="_window" then modus=""
  42.  
  43. 'gs -sDEVICE=amiga'||modus||' '||file 
  44.  
  45. exit
  46.  
  47.  
  48. ERROR:
  49.    exit
  50.