interrupting a repeat loop

Jacques Hausser jacques.hausser at
Tue Dec 15 10:55:37 EST 2009

Tim, I forgot two little things:

local stoploop

command runTheLoop
  put empty into stoploop -- as stoploop is a "permanent" variable, it should already contain "S" and the loop will not run
  repeat forever
     if stoploop = "S" then exit repeat
     -- do what you want
     wait 10 milliseconds with messages
  end repeat
end runTheLoop

on keyDown thekey
   put thekey into stoploop
   pass keydown -- depends of what else is in your card script, without this line something else could be blocked...
end keydown

Sorry, I was answering too quickly !


Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax: 	++ 41 22 366 19 40
mobile:	++ 41 79 757 05 24
E-Mail:	jacques.hausser at

More information about the Use-livecode mailing list