Random #'s

Nicolas Cueto nicolas_cueto at yahoo.com
Thu Jan 27 05:21:20 EST 2005

Here's one way to do it, with a button-script:

on mouseUp
    if the number of lines in tResult > 5 then exit repeat
    put random(10) into tRand
    if tRand is not among the lines of tResult then
      put tRand & cr after tResult
    end if
  end repeat
  delete the last char of tResult
  replace cr with comma in tResult
  put tResult into field "fNumbers"
end mouseUp

Nicolas Cueto
niconiko language school

More information about the Use-livecode mailing list