home *** CD-ROM | disk | FTP | other *** search
- /* This macro will allow a user to highlight some text in TxEd plus
- * and then have it linked automagically by simply choosing it the
- * link option from a menu or from a control key sequence.
- */
- /* lock the keyboard to prevent user munging.... */
- 'MSG Setting up link'
- 'LOCK 1'
-
- /* If this fails, users didn't highlight any text. Tell them and exit */
- 'CUT'
- if rc > 5 then
- do
- MSG "No text highlighted!"
- exit
- end
-
- options results
- link_string = link.rexx()
- if link_string = "" then
- do
- 'Paste'
- exit
- end
-
- 'Insert' link_string
- 'Insert " "'
- 'Paste'
-
- 'Status C'
- if result ~== " " then
- 'RIGHT'
- end_str = "\Endlink "
- 'Insert' end_str
-