Re: Recoding: search and replace

2016-11-16 Thread Richmond
Thanks, but to be honest I'm not worried about speed: I can go and have a bath, listen to some music, and, heaven forfend (!), go and spend some time talking with my wife. As Devawriter Pro is an ongoing project (7 years and counting) that has brought me almost exactl $300 so far the speed at

Re: Recoding: search and replace

2016-11-16 Thread Mike Bonner
The only thing I would do different would be to use the "repeat for each" form rather than putting into lines. If your script is really long, the time savings will add up. I THINK it will make an even greater difference because you a) have to look at a specific line, then b) you have to grab the

Re: Recoding: search and replace

2016-11-16 Thread Tore Nilsen
And this should be: on mouseUp put script of image "xxx" into tScriptToChange put 0 into tLineNumber repeat for each line tLine in tScriptToChange add 1 to tLineNumber if "unicodeText" is in tLine then put replaceText(tLine,"unicodeT","t") into line tLineNumber of tScriptToChange end if if

Re: Recoding: search and replace

2016-11-16 Thread Tore Nilsen
I think this will be even faster. Put the script directly into a variable, use a repeat for structure and replace text as needed directly in the variable. You may not notice much of a speed improvement for smaller scripts, but if the script is longer, this should execute faster than your version

Re: Recoding: search and replace

2016-11-16 Thread Richmond
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 unt

Re: Recoding: search and replace

2016-11-07 Thread Peter TB Brett
On 06/11/2016 12: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(1

Re: Recoding: search and replace

2016-11-06 Thread Mike Bonner
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 unicod

Re: Recoding: search and replace

2016-11-06 Thread Richmond
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@list

Re: Recoding: search and replace

2016-11-06 Thread hh
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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscriptio

Re: Recoding: search and replace

2016-11-06 Thread hh
> Richmond M. wrote: > *put (numToCodePoint(107) & numToCodePoint(104)) into \ > fld "fDECODE"* where /(numToCodePoint(107) & numToCodePoint(104))/ vary? You could try put "107,104" &cr& "104,107" &cr & ... into myNums repeat for each line L in myNums put numTocode(item 1 of L) & numToCode(it

Recoding: search and replace

2016-11-06 Thread Richmond
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 d