Numbering of lines in a field
Charles Szasz
cszasz at me.com
Sun Apr 27 20:00:22 EDT 2014
I have a scrolling field that contains a number of lines. Some of the lines begin with “CHC". I have been trying to number only the lines between lines that contain “CHC” and then starts numbering again between the next pair of lines containing “CHC”
For example,
CHC
1.
2.
3.
4.
5.
CHC
1.
2.
3.
CHC
1.
2.
3.
4.
5.
I have tried different variations with the following script and achieved numbering sequentially between CHC lines but the numbering does not start over after each line CHC line.
repeat with i = 1 to the number of lines in field “recommendations"
if "CHC" is not among the words of line i in field "recommendations"
then
put i &"."& space before line i of field "recommendations"
end if
end repeat
Any suggestions?
Charles Szasz
cszasz at mac.com
More information about the use-livecode
mailing list