home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / WordProcessors / PAGESTREAM3,0-1.DMS / in.adf / Macros.LHA / AutomaticTextFrame.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1994-09-01  |  1.4 KB  |  46 lines

  1. /* AutomaticTextFrame.rexx */
  2. /* Copyright 1994 Soft-Logik Publishing Corporation */
  3. /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4. /* $VER: 1.0 */
  5.  
  6. OPTIONS RESULTS
  7. TRACE OFF
  8.  
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. ADDRESS 'PAGESTREAM'
  14.  
  15. /* Check and see if a text frame is selected */
  16. 'getobject type objtype'
  17. say objtype
  18. if objtype=11 then do
  19.     'refresh wait'
  20.     getcolumn position pstem columns number gutter space rotation rstem about rstem constrain cflag print pflag
  21.     pstring=pstem.left' 'pstem.top' 'pstem.right' 'pstem.bottom' skew 'rstem.slant' 'rstem.twist' columns 'number' gutter 'space
  22.     if rstem.mode=POINT then pstring=pstring' about 'rstem.x' 'rstem.y
  23.     if cflag=ON then pstring=pstring' constrain'
  24.     if pflag=OFF then pstring=pstring' noprint'
  25.     getdisplay dstem
  26.     display page dstem.page+1
  27.     'drawcolumn 'pstring
  28.     'refresh continue'
  29. end
  30. else do
  31.     allocarexxrequester '"Automatic Text Frame Error!"' 524 51
  32.     reqhandle=result
  33.     addarexxgadget reqhandle EXIT 235 34 70 label "_Exit"
  34.         Exithandle=result
  35.     addarexxgadget reqhandle TEXT 8 10 504 border none string "'The insertion point must be in a text frame to use this macro.'"
  36.     doarexxrequester reqhandle
  37.     freearexxrequester reqhandle
  38.     EXIT
  39. end
  40. EXIT
  41.  
  42. CANCEL:
  43. selectobject objectid objnum
  44. 'refresh continue'
  45. EXIT
  46.