Floppy Posted January 25, 2009 Posted January 25, 2009 Hello, I have this script: $random_first_name_letters=Random(1,10,1) For $name_width=1 To $random_first_name_letters $name=Chr(Random(Asc("a"),Asc("z"),1)) Next MsgBox(0,"",$name) Is there a way to show in the message-box all letters (joined) retrived by $name? Thanks
Andreik Posted January 25, 2009 Posted January 25, 2009 (edited) Hello, I have this script: $random_first_name_letters=Random(1,10,1) For $name_width=1 To $random_first_name_letters $name=Chr(Random(Asc("a"),Asc("z"),1)) Next MsgBox(0,"",$name) Is there a way to show in the message-box all letters (joined) retrived by $name? ThanksUse & to join two strings or concatenation assignment (&=) MsgBox(0,"",GetRandomChars()) MsgBox(0,"",GetRandomChars()) MsgBox(0,"",GetRandomChars()) Func GetRandomChars() $NUM = Random(1,10,1) $CHAR = "" For $INDEX = 1 To $NUM $CHAR &= Chr(Random(Asc("a"),Asc("z"),1)) Next Return $CHAR EndFunc Edited January 25, 2009 by Andreik
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