#define randomEx(%1,%2) (random(%2)+%1) //if you don't want it to be 0 but it might exceed the max, so set max to 9.