spel565 Posted August 20, 2009 Posted August 20, 2009 I want to create a script that creates a random number, but the number cannot be "00" (Or f.ex the number cannot be less then "10"), how?Can i make a scripts that picks one of f.ex 5words (i have choosen) randomly?Global $sRandom For $i = 1 to 2 $sRandom &= Random(0,9,1) next Send($sRandom)New AutoIt v3 Script.au3
Manjish Posted August 20, 2009 Posted August 20, 2009 Like this: MsgBox(4096,"",Int(Random(11,99))) [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
spel565 Posted August 20, 2009 Author Posted August 20, 2009 Like this: MsgBox(4096,"",Int(Random(11,99))) Is it possable to make the same thing with words?
Manjish Posted August 21, 2009 Posted August 21, 2009 (edited) U'll need a dictionary for that.. Put all the words in that dictionary into an array and you can randomly read any element using above method.. like: array[Random(11,99)] Edited August 21, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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