Loop slow? (was: Up and running!)

John Dixon dixon.j at btconnect.com
Sat Dec 29 10:25:01 EST 2001


on 29/12/2001 12:10, Andre Rombauts at andre.rombauts at win.be wrote:

Andre,

I used a little different script to yours. This script should take 5 ticks
to run... it will have finished and displayed the numbers in fld 1 and the
number of ticks in the message box before the first beep has finished
playing!... why?... the sound is queued.

if you take 'lock screen' out of the handler it will take 96 ticks as it is
updating the display with every repeat.

global gstartTime,gendTime

on mouseUp
  set the text of fld 1 to empty
  lock screen
  put the ticks into gstartTime
  repeat with k = 1 to 129
    if k = 65 or k = 97 then beep
    put k into line k of fld 1
  end repeat
  put the ticks into gendTime
  put gendTime - gstartTime
end mouseUp


John Dixon





More information about the Use-livecode mailing list