Recoding: search and replace

Mike Bonner bonnmike at gmail.com
Sun Nov 6 10:28:15 EST 2016


Using a backup of course.. You might try something simple like..

repeat for each line tline in the script of stack "yourscripttarget"--
wherever your script is.
   if tline contains "set the unicodetext of fld " & quote & "fDECODE"&
quote & " to (numtocodepoint(" then
      replace "set the unicodetext of fld " & quote & "fDECODE"& quote & "
to " with "put " in tline
      put " into field " & quote & "fDECODE" & quote after tLine
      put tline & cr after tNewScript
   else
      put tline & cr after tNewScript
   end if
end repeat
delete the last char of tNewScript

set the script of stack "yourscripttarget" to tNewScript



On a very small test scale it seems to work.  Curious though, is the
current method working?

On Sun, Nov 6, 2016 at 6:22 AM, Richmond <richmondmathewson at gmail.com>
wrote:

> Thanks: I hope you manage to get some rest.
>
> Richmond
>
>
> On 6.11.2016 15:19, hh wrote:
>
>> I'm so tired, but there is an exit from my typos:
>>
>> function numToCode n
>>     return numToCodePoint(n)
>> end numToCode
>>
>> ;-)
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list