September 30, 201312 yr Hi I have a bunch of premade scripts that format completely different styles of text in a merge field. I am asking how to make a calculation to execute a random script from the group. Something like Random (Script1, Script2, Script3) So it will play a random script each time.. Thanks for your help Dave
September 30, 201312 yr You need a plugin to run a script from a calculation, you can look at http://www.softs4humans.com/FMPro_Plugins.html as a starting point.
September 30, 201312 yr 1. Check what these sub-scripts do. If each uses the same functions, only with a different set of parameters each time, then use a single script and randomize the (choice of) function arguments. 2. If there aren't too many scripts involved, you could use branching like this, e.g. for n sub-scripts: Set Variable [ $rand ; Int ( ( Random ) * n ) + 1 ] If [ $rand = 1 ] Perform Script [ Script 1 ] # … Else If [ $rand = n ] Perform Script [ Script n ] End If Might get a bit tedious for a reasonably large n…
Create an account or sign in to comment