Cancel a repeat with a button

Kay C Lan lan.kc.macmail at gmail.com
Wed May 13 10:32:52 EDT 2009


On Wed, May 13, 2009 at 10:01 PM, Ludovic Thébault <
ludovic.thebault at laposte.net> wrote:

>
> How interrupt a repeat loop by a button ?
> While a copy of a lot of files with rev, i want the user can cancel the
> copy.
>

Maybe something like:

>
>  repeat for each line l in it

       if the optionKey is down then
             exit repeat
      else

>
>          if char 1 of l <> "." then
>            put convertpath(tstack&"/"&l) into tpath1
>            put convertpath(tlibrary&"/") into tpath2
>            get shell("cp "&tpath1&&tpath2)
>         end if


       end if

>
> end repeat
>
>
Check the Dictionary for optionKey and checkout See Also for other
possibilities.

HTH



More information about the use-livecode mailing list