home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 626a.lha / Textra_v1.12 / Scripts / WhereAmI.textra < prev   
Text File  |  1991-12-18  |  1KB  |  32 lines

  1.     /******************************************************************
  2.      *   TEXTRA AREXX script -- Mike Haas, 1991, All Rights Reserved.  *
  3.      * Freely distributable ONLY as a component of the TEXTRA package. *
  4.      * This banner may not be removed or altered (improvements to the  *
  5.      *    actual program welcome).  Please document and send to me.    *
  6.      *        !!! PLACE THIS FILE IN YOUR REXX: DIRECTORY !!!          *
  7.      ******************************************************************/
  8.  
  9. /* Usage:  WhereAmI
  10.  *
  11.  * This script accepts no parameters, and simply prints out the line
  12.  * & column info for the current cursor position or select range.
  13.  *
  14.  */
  15.  
  16. options results
  17.  
  18. get cursor position
  19.  
  20. if (result ~= SELECT) then do
  21.     parse var result xpos' 'ypos
  22.     notify '"Cursor is at col 'xpos', line 'ypos'."'
  23. end
  24. else do
  25.     get select position
  26.     parse var result xstart' 'ystart' 'xend' 'yend
  27.     if (ystart == yend) then
  28.         notify '"Selected from col 'xstart' to col 'xend' of line 'yend'."'
  29.     else
  30.         notify '"Selected from col 'xstart' of line 'ystart' to col 'xend' of line 'yend'."'
  31. end
  32.