Macro to choose randomly one of the actions/groups/macros?

Is is possible to have 3 different actions/groups/macros, and each time randomly execute one of them after the trigger?

You can use the RAND function return a random number from 0 to 2


And you can use that in a Switch statement to select among three choices.

So basically:

  • Set variable R to RAND(3)
  • Switch on variable R
    • if it is 0 then
      • do stuff
    • if it is 1 then
      • do stuff
    • if it is 2 then
      • do stuff

Would it be something like this?

Why RAND(3) is red? Should I type only the number 3?

RAND(3) is red because RAND(3) is not a legal variable name.

That is why I said you need to set a variable to the calculation result of RAND(3).

Set variable R to calculation RAND(3)

Then use the variable in the switch action.

1 Like