Recoding: search and replace

Richmond richmondmathewson at gmail.com
Wed Nov 16 13:13:41 CET 2016


So; here I am, as per usual, replying to my own message having found 
that nothing quite so elaborate was required:

/put empty into fld "fSSS1"//
//   put the script of img "xxx" into fld "fSSS1"//
//   put the number of lines of fld "fSSS1" into TERMINUS//
//   put 1 into QOUNT//
//   repeat until QOUNT > TERMINUS//
//      if line QOUNT of fld "fSSS1" contains "unicodeText" then//
//         put line QOUNT of fld "fSSS1" into PROCESST//
//         put replaceText(PROCESST,"unicodeT","t") into line QOUNT of 
fld "fSSS1"//
//      end if//
//      if line QOUNT of fld "fSSS1" contains "useUnicode" then//
//         put "--deprecated code removed (useUnicode)" into line QOUNT 
of fld "fSSS1"//
//         end if//
//         add 1 to QOUNT//
//      end repeat//
///
Richmond.

On 6.11.2016 14:44, Richmond wrote:
> I wonder if there is a way to replace this:
>
> set the unicodeText of fld "fDECODE" to (numToCodePoint(107) & 
> numToCodePoint(104))
>
> with this:
>
> *put (numToCodePoint(107) & numToCodePoint(104)) into fld "fDECODE"*
>
> where /(numToCodePoint(107) & numToCodePoint(104))/ vary?
>
> I have no great urge to do that sort of thing manually about 6 million 
> times.
>
> Richmond.



More information about the use-livecode mailing list