repeat 100 times
-- exit loop if "." or the escapeKey is pressed
if 46 is in the keysDown or 65307 is in the keysdown then
answer "exiting"
exit repeat
else
-- do stuff
wait 200 millisec
end if
end repeat