home *** CD-ROM | disk | FTP | other *** search
/ Creation of the World (Enhanced Edition) / begin98.iso / MAIN116.DXR / 00136_setRightString.ls < prev    next >
Encoding:
Text File  |  1997-09-02  |  566 b   |  22 lines

  1. on setRightString charList
  2.   set x to count(charList)
  3.   set oldtext to EMPTY
  4.   set i to 1
  5.   repeat while i < 25
  6.     set j to random(x)
  7.     if (i mod 3) = 0 then
  8.       if (j mod x) <> 0 then
  9.         set oldtext to oldtext & " " & getAt(charList, j mod x)
  10.       end if
  11.     else
  12.       if (j mod x) <> 0 then
  13.         set oldtext to oldtext & getAt(charList, j mod x)
  14.       end if
  15.     end if
  16.     set i to i + 1
  17.   end repeat
  18.   set the text of field "RightString" to oldtext
  19.   set the text of field "IsRightString" to EMPTY
  20.   set the text of field "InputString" to "_"
  21. end
  22.