exit a repeat-handler
karlpet at mac.com
Sat Jun 1 19:47:01 CDT 2002
At 9:21 PM +0200 6/1/02, meili wrote:
>Why is it not possible to exit the following repeat-forever-handler by
>using the mouseclick-function?
> repeat forever
> if the mouseclick then
> end if
> end repeat
Your script works okay here, meili. But the Transcript Dictionary says this:
"The word break appears on a line by itself, within a case section of
a switch control structure."
"The break command should not be used outside a switch structure. If
it appears outside a switch structure, it has the same effect as the
exit control structure."
So it's probably better form to use something like this:
repeat until the mouseClick
if the mouseClick then exit repeat
More information about the use-livecode