home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / WordProcessors / slt-pgs3.lzx / PageStream3 / Scripts / PrintBorders.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1997-07-16  |  1.2 KB  |  50 lines

  1. /* $VER: PrintBorders.rexx 1.1 (12.06.97)
  2.    Copyright 1997 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. OPTIONS RESULTS
  6. TRACE OFF
  7.  
  8. /* Make sure rexx support is opened */
  9. IF ~SHOW('L','rexxsupport.library') THEN
  10.    CALL ADDLIB('rexxsupport.library',0,-30)
  11.  
  12. ADDRESS 'PAGESTREAM'
  13.  
  14. 'newdocument Borders'
  15. 'newmasterpage "Default Master Page" 8.5i 11i single portrait'
  16. 'openwindow "View 1" page 1'
  17. 'extension getborderslist 'stem
  18. count=result
  19.  
  20. page = 1
  21. x = 0
  22. y = 0
  23. do i=0 to count-1
  24.     x1 = '"'||x+.5||'i"'
  25.     y1 = '"'||y+.5||'i"'
  26.     x2 = '"'||x+4||'i"'
  27.     y2 = '"'||y+3.5||'i"'
  28.     extension drawborder x1 y1 x2 y2 borderstyle '"'stem.i'"' "page" page
  29.  
  30.     x1 = '"'||x+1||'i"'
  31.     y1 = '"'||y+.25||'i"'
  32.     drawtextobj x1 y1 infront "page" page
  33.     selecttext at x1 y1 frontmost "page" page
  34.     'insert "'stem.i'"'
  35.  
  36.     x = x + 4
  37.     if x > 5 then do
  38.         x = 0
  39.         y = y + 3.5
  40.         if y > 8 then do
  41.             y = 0
  42.             page = page + 1
  43.         end
  44.     end
  45.  
  46. end i
  47.  
  48. printdocument copies 1 document "Borders" sides both scale actual output grayscale pictures on collate off reverseorder off printblank off printermarks off mirror off negative off
  49. closedocument force
  50.