|
Here is a very simple macro that should encapsulate the replace function John was looking for. Sorry for the mix-up. It's very primitive; it'd be great to see somebody turn this into a real dialogue box. Also, it might be nice to save the strings for next time. Not to mention the ability to be case sensitive or not. As you can see, it has a lot of shortcomings! I call it RPL.LX. Be sure to put it in your private macro folder, not WDT400/macros. /* Replace a string without losing your place */ /* Ask for the source string */ src = prompt('RPL.LX', 'Source string') if src = '##PrOmPt_EsCaPe##' then exit /* Ask for the target string */ tgt = prompt('RPL.LX', 'Target string') if src = '##PrOmPt_EsCaPe##' then exit /* save my place */ 'mark set rpl' /* up to the top of the file */ top /* replace */ 'change asis ,'src','tgt',bottom,,?' /* go back to my place */ 'mark find rpl' exit prompt: parse arg title,prompt 'set lineread.title' title 'set lineread.prompt' prompt 'lineread 80' 'extract lastkey' if lastkey = 'ESC' then return '##PrOmPt_EsCaPe##' 'extract lastline' return lastline
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.