Random number with ranges

Anyone have action script code that would give me a number between a minimum and maximum range like 15 - 30?

BigFix computer IDs are random-ish – you can use its modulo of an arbitrary number to get a random-ish number in a range, and then add that to your base. So to get a number in the range 15 - 30 you could use:
computer id mod 16 + 15
(computer id mod 16 will give you an integer in the range 0-15, then add 15 to make it 15-30)

1 Like

Looks like as of version 9.5.3 there’s a ‘random integer of’ inspector that’s even easier:
random integer of 15 + 15
(random integer of 15 will give an integer in the range 0-15, then add 15 to it for 15-30)

3 Likes