ext_sayString - done handling

Ken Ray kray at sonsothunder.com
Mon Mar 17 17:25:02 EST 2003


> I'm sure this is an easy one for many, the problem being 
> whether or not there is a "with message" or "wait until the 
> speaking is over" technique for handling speaking one thing 
> after another using the external. I have a repeat with the 
> general design:
> 
> repeat until stopRunning=true
>   repeat for each line thisMsg in serverMessages
>     
>     send "updateMessages" to this stack
>     ext_sayString thisMsg
>     
>   end repeat
> end repeat
> 
> 
> Which runs out of control.

One possible problem is the "repeat until stopRunning = true"; I don't
see where stopRunning is set at all, and even if it was, the second
repeat line should do it (meaning you don't need the first repeat unless
you're repeating all the phrases multiple times). The only thing I don't
know is whether the external is "blocking" (that is, it doesn't go on to
the next line of script until it has finished speaking); my guess is
that it isn't which is probably the reason for it running out of
control. It hits the "ext_sayString" command, executes it, and then as
it is speaking it moves on to the next repeat. You should check to see
if there is some return value from ext_saystring you can use to
determine if you need to keep going or not.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the use-livecode mailing list