home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDGE1_704.DMS / in.adf / Edge_Rexx.lha / NewIndented.edge < prev    next >
Encoding:
Text File  |  1993-10-27  |  892 b   |  46 lines

  1.  
  2. /*
  3. ** $VER: NewIndented.edge 1.2 (Sunday 08-Aug-93 02:48:49)
  4. **
  5. ** Open a new file with the window down indented 
  6. **
  7. ** Written by Thomas liljetoft
  8. */
  9.  
  10. options results
  11.  
  12. /* get the users error-report level */
  13.  
  14. getenvvar _ge_errlevel
  15. errlevel = result
  16.  
  17. /* get current window size and position */
  18.  
  19. 'window'
  20. parse var result 'X ' x ', Y ' y ', W ' w ', H ' h ','
  21.  
  22. /* get size of text font */
  23.  
  24. 'getenvvar' _ge_realtextfontsize
  25. fontheight = result
  26.  
  27. /* now - open a new window 2 lines down and 2 lines
  28.     smaller than the current window.
  29.     With a little more code this script can be made
  30.     to look for the smallest and most indented window
  31.     and use that one for the calculations of the new
  32.     window. */
  33.  
  34. diff = 2*fontheight;
  35. 'new'    topedge y+diff height h-diff
  36.  
  37. if RC >= errlevel then do
  38.  
  39.     /* something went wrong enought to be reported so report */
  40.  
  41.     'fault'
  42.     'requestnotify' '"'result'"'
  43.     end
  44.  
  45. exit(0)
  46.