home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / utilities / comms / html-heaven / arexx / ttx-attach.rexx < prev    next >
OS/2 REXX Batch file  |  1996-01-08  |  2KB  |  64 lines

  1. /**
  2.  ** REXX:HTMLedit.ttx  v. 1.0  February 19, 1995
  3.  ** Author: Clete Baker (cletus@gonix.com)
  4.  **
  5.  ** This script launches certain of the HTML Heaven suite of programs,
  6.  ** resizes the TurboText window to accomodate them, and cancels
  7.  ** the Word Wrap function.  You will need to edit this script to
  8.  ** your own preferences according to the comments below.
  9.  **
  10.  ** This can be made into a menu item by editing TTX_Startup.dfn
  11.  ** to include the line:
  12.  ** 
  13.  **   ITEM "Edit HTML"         ""  ExecARexxMacro REXX:HTMLedit.ttx
  14.  **
  15.  ** as the last item under the "Windows" menu (or other menu
  16.  ** location of your choice.
  17.  **/
  18.  
  19. options results                        /* get results                    */
  20. Address 'TURBOTEXT' 'ActivateLastDoc'  /* capture address of calling doc */
  21. Address value result                   /* ... and direct output to it    */
  22.  
  23. GetWindowInfo                          /* snag current window parameters */
  24. parse upper var result icon x y width height minwidth minheight numviews
  25.  
  26. /**
  27.  ** Set your own defaults here; these work fine for me on
  28.  ** my NTSC screen.  You may have to do some empirical
  29.  ** playing to find the right values for you.  You'll also
  30.  ** have to replace "TurboText:Support/<progname>" in the
  31.  ** following with the correct path to your copies of the
  32.  ** HTML Heaven programs.  At the same time you'll want to
  33.  ** apply whichever tooltype/startup parameters you wish
  34.  ** for each of the programs.  Try offset = 60 for HTML-Helper;
  35.  ** offset = 42 for HTML-Genie.
  36.  **/
  37.  
  38. offset  = 42                          /* how far do we drop TTX's screen? */
  39. helper  = 'run >nil: TurboText:Support/HTML-Helper PUBSCREEN=TURBOTEXT'
  40. toolkit = 'run >nil: TurboText:Support/Toolkit PUBSCREEN=TURBOTEXT TOPEDGE=230 LEFTEDGE=486'
  41. heaven  = 'run >nil: TurboText:Support/HTML-Genie PUBSCREEN=TURBOTEXT'
  42.  
  43. /**
  44.  ** Making sure that the height with offset applied doesn't
  45.  ** drop below the minimum height for TurboText windows, apply
  46.  ** the offset to the top of TurboText's current window, leaving
  47.  ** bottom and side positions alone.
  48.  **/
  49.  
  50. if ~((height-offset) < minheight) then do
  51.    MoveSizeWindow x (y+offset) width (height-offset)
  52.    end
  53. else exit
  54.  
  55. SetPrefs WordWrap OFF                  /* you may prefer to leave WW ON  */
  56.  
  57. /**
  58.  ** Address command helper             /* open HTML-Helper on TTX screen */
  59.  **/
  60. Address command toolkit                /* open Toolkit on TTX screen     */
  61. Address command heaven                 /* open HTML-Genie on TTX screen  */
  62.  
  63. exit
  64.