# Going through A through Z

## Recommended Posts

\$crap = String("BK" & \$rand1 & \$rand2 & "-" & \$rand3 & \$rand4 & \$rand5 & \$rand6 & \$rand7 & \$rand8 & "-" & "X" & \$rand9 & \$rand10 & \$rand11 & \$rand12 & "2" )

\$rand1 = Chr(Random(Asc("A"), Asc("Z"), 1))

I want to have numbers as well in the randomization... How can I implement that

##### Share on other sites

create your function, check the params of the function, see if StringIsInt or StringIsFloat, if so then random on those numbers, else random on the asc of the params.

Don't argue with an idiot; people watching may not be able to tell the difference.

##### Share on other sites

\$crap = String("BK" & \$rand1 & \$rand2 & "-" & \$rand3 & \$rand4 & \$rand5 & \$rand6 & \$rand7 & \$rand8 & "-" & "X" & \$rand9 & \$rand10 & \$rand11 & \$rand12 & "2" )

\$rand1 =  Chr(Random(Asc("A"), Asc("Z"), 1))

I want to have numbers as well in the randomization... How can I implement that

<{POST_SNAPBACK}>

DIM \$RAND_[13]

FOR \$X = 1 TO 12

\$rand_A = Chr(Random(Asc("A"), Asc("Z"), 1))

\$RAND_B = Random(0, 9, 1)

If Random() < 0.5 Then

\$RAND_[\$X] = \$RAND_A

Else

\$RAND_[\$X] = \$RAND_B

Endif

MsgBox(0,"LETTER OR NUMBER", \$RAND_[\$X] )

NEXT

;\$CRAP = \$RAND_[1] & \$RAND_[2] & .......BLA... BLA

HOPE IT HELPS

8)

## Create an account

Register a new account