i often have a similar need... i created my simple function...

`int MyRandom(int min, int max) {`

int random = -1;

while ( random < min ) {

random = Random(max);

}

return random;

}

Then, in AppMain() put something like **RandomSetSeed(time(0));** (in order to have real random numbers) ... and when you need your random number, just call something like **ran = MyRandom(500,2000);**