>The result I get in my "answer" member ...
>Now to the problem... the scritpt works perfectly but if I have say 15
>chapters there will be 15 case of scripts and 15 alternatives too..
>Is there away to do the same with less code?
The whole approach may have problems, but sticking with it, you can
reduce the script to a repeat loop:
on mouseup
fieldcount = 4 --change this to 15, or whatever is the total
number of chapters/fields
chapterletters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" --enough for 26 chapters
answertext = "" --the text that will go into your "answer" member
repeat with a = 1 to fieldcount
put char (the text of field a) of chapterletters into char a
of answertext
end repeat
member("answer:).text = answertext
end
As I said, this may not be the best way to do things anyway. For a
start, you're relying on the user to get it right. What happens if
they leave a field empty, or repeat a number? It might be better, and
more fun for the user, to have them drag the chapters into a
particular order. That way you can be sure the chapters are all taken
care of.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]