On Jul 13, 2011, at 6:01 PM, Timothy Miller wrote:

> Hi,
> 
> Let's say that I want to do something like
> 
> repeat with i = 1 to 6
> do "whatever" & i
> end repeat
> 
> Except, I want 1 to 6 to be in random sequence
> 
> I could think of a few kludgy ways to do this.
> 
> Is there a standard approach? A simple approach?
> 
> Thanks in advance.

on mouseUp
   local theNums
   put "1,2,3,4,5,6" into theNums
   sort  items of theNums numeric by random(1000000)
   repeat for each item I in theNums
      --do "whatever" & I      
   end repeat
   put theNums
end mouseUp


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to