home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / FINCAL2.DMS / in.adf / FCrexx.lha / Make_Graph_Print_Jobs.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-03-09  |  1.0 KB  |  49 lines

  1. /* FinalCalc script to scan though the graphs list and 
  2.    builds a print job for each one. */
  3.  
  4. options results
  5. shutdown = 0
  6. count = 0
  7.  
  8.  
  9. REQUEST '"This script will generate a print job for every graph in the current project."' '"Go Ahead."' '"Forget It!"'
  10.  
  11. returned = result
  12.  
  13. if returned = 1 then do
  14.     graph first
  15.     graphname = result;
  16.  
  17.     do until shutdown
  18.  
  19.        job '"'graphname'"' exists
  20.  
  21.        if rc = 130 then do
  22.            count = count+1
  23.     
  24.            job '"'graphname'"' new
  25.            job '"'graphname'"' graph '"'graphname'"'
  26.            job '"'graphname'"' sideways on
  27.            job '"'graphname'"' header_left '"Graph: %j"'
  28.            job '"'graphname'"' header_right '"%d"'
  29.            job '"'graphname'"' defsize on
  30.            end
  31.  
  32.         graph next
  33.         graphname = result
  34.  
  35.         if graphname='' then
  36.             shutdown = 1
  37.  
  38.         end
  39.  
  40.     if count > 0 then do
  41.         text = "Generated" count "graph print jobs."
  42.         request '"'text'"'
  43.         end
  44.     else
  45.         request '"No graphs found."'
  46.     end
  47.  
  48. exit
  49.