April 25, 201411 yr Hi I would like to find out if there is a way to run a script from a list by random means In other words if I have the following scripts: script 1 script 2 script 3 script 4 script 5 script 6 script 7 I would like to have a mains script called "Random script" and it would run a random script from the list. So when I activate the script it plays Script 6 but the next time by random from this list of scripts it plays script 4 Can this be done and how Thanks
April 25, 201411 yr Yes, this can be done: Set Variable [$scriptCount; Value:7] Set Variable [$scriptToRun; Value:Ceiling ( ( 1 - Random ) * $scriptCount )] If [$scriptToRun = 1] Perform Script ["Script 1"] Else If [$scriptToRun = 2] Perform Script ["Script 2"] Else If [$scriptToRun = 3 ... End If
April 25, 201411 yr Author Thanks for that. It is so good to know people know things and help here. Really good stuff Grateful
Create an account or sign in to comment