Sign in to follow this  
Followers 0
kjcdude

"Random" Help

3 posts in this topic

I need to randomly pull a key from an ini file that is numbered from 001 to 150.

Everything works as it should beside the fact that the random output for anything under 100 is "5" instead of "005" thus it reads the ini file wrong.

Is there a way to random numbers using the format that is inputed.

$randomnum = Random(001, 150, 1)

Share this post


Link to post
Share on other sites



$randomnum = StringFormat('%03d', Random(1,150,1))


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Thats why i love the autoit forums. An accurate answer within minutes.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0