Jump to content

# 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 this post

##### 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 this post

##### 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}>

HOWS ABOUT THIS

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

CANT TEST "NADA"... IN MEXICO

8)

## 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

×

• Wiki

• Back

• Git

## Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.