home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 504a.lha / hypertext / Rexx / link.txed < prev    next >
Text File  |  1991-05-01  |  647b  |  34 lines

  1. /* This macro will allow a user to highlight some text in TxEd plus
  2.  * and then have it linked automagically by simply choosing it the
  3.  * link option from a menu or from a control key sequence.
  4.  */
  5. /* lock the keyboard to prevent user munging.... */
  6. 'MSG Setting up link'
  7. 'LOCK 1'
  8.  
  9. /* If this fails, users didn't highlight any text.  Tell them and exit */
  10. 'CUT'
  11. if rc > 5 then
  12.   do
  13.    MSG "No text highlighted!"
  14.    exit
  15.   end
  16.  
  17. options results
  18. link_string = link.rexx()
  19. if link_string = "" then
  20.  do
  21.   'Paste'
  22.   exit 
  23.  end
  24.  
  25. 'Insert' link_string
  26. 'Insert " "'
  27. 'Paste'
  28.  
  29. 'Status C'
  30. if result ~== " " then
  31.  'RIGHT'
  32. end_str = "\Endlink "
  33. 'Insert' end_str
  34.