kjcdude Posted February 27, 2008 Share Posted February 27, 2008 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) Link to comment Share on other sites More sharing options...
Siao Posted February 27, 2008 Share Posted February 27, 2008 $randomnum = StringFormat('%03d', Random(1,150,1)) "be smart, drink your wine" Link to comment Share on other sites More sharing options...
kjcdude Posted February 27, 2008 Author Share Posted February 27, 2008 Thats why i love the autoit forums. An accurate answer within minutes. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now