Jump to content

Random Password Generator


dmollico
 Share

Recommended Posts

I needed a way to create a random alphanumeric password and modified the current autoit random stuff to do what I needed it to do.

;#################################
;Create Seed
;##################################
Do
    If Random() < 0.5 Then
        If Random(0,1,1) = 0 Then $seed = $seed & Random(5,10,1)
        If Random(0,1,1) = 1 Then $seed = $seed & Random(0,4,1)
    $Letter = Chr(Random(Asc("A"), Asc("Z"), 1))
    $seed = $seed & $Letter
Else
    If Random(0,1,1) = 1 Then $seed = $seed & Random(5,10,1)
    If Random(0,1,1) = 0 Then $seed = $seed & Random(0,4,1)
    $Letter = Chr(Random(Asc("a"), Asc("z"), 1))
    $seed = $seed & $Letter
Endif
Until (StringLen($seed) >  6)

obviously you can make the until variable a variable itself so you can specify the length. I just wanted to post this for anyone that needed it. I couldn't find one on the forums.

Enjoy, let me know if you like it. I don't normally post but it's nice to hear stuff you make is useful!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...