|
moksha Novice
Joined: 13 Oct 2002 Posts: 37 Location: United Kingdom
|
Posted: Wed Jan 14, 2004 3:44 pm
Help needed please |
Hi,
I have a list of commands in a variable list. how would I pick one at random, execute it and then delete it from the list?
Thanks in advance
Moksha |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Wed Jan 14, 2004 3:55 pm |
Try:
#var random {%random(1,%numitems(@variable))}
%item(@variable,@random)
#delnitem variable @random |
|
|
|
moksha Novice
Joined: 13 Oct 2002 Posts: 37 Location: United Kingdom
|
Posted: Wed Jan 14, 2004 5:35 pm |
Thanks, it works great.
Moksha |
|
|
|
|
|