Sign in to follow this  
Followers 0
shism2

Going through A through Z

3 posts in this topic

$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


Link to 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.


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to 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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0