Jump to content

_Generate


thomaatje
 Share

Recommended Posts

I know AlmarM made a password gen UDF but this one works difrent...

Func _Generate($MaxChar)
    $Pass = ""
    Dim $Array[1] = [Chr(Random(Asc("0"), Asc("Z")))]
    $i = 1
    $i2 = 0

    Do
        _ArrayAdd($Array, Chr(Random(Asc("0"), Asc("Z"))))
        $i = $i + 1
    Until $i = $MaxChar

    Do
        $Pass &= $Array[$i2]
        $i2 = $i2 + 1
    Until $i2 = $MaxChar

    Return $Pass
EndFuncoÝ÷ Øw«{ljw±jjey«­¢+Ø%¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(%¹±Õ±ÐíÉÉä¹ÔÌÐì((ÀÌØíµ¥¸ôU%
ÉÑ ÅÕ½ÐíAÍ̹ÉѽÈÅÕ½Ðì°ÐÀÀ°ÄÈÀ¤((ÀÌØí    ÕÐÄôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí¹ÉÑÅÕ½Ðì°ÐÀ°àÀ°ÄÀÀ¤(ÀÌØí9Õµ%¹ÁÕÐôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìàÅÕ½Ðì°ÈÀÀ°àÀ°àÀ¤(ÀÌØíUÁ½Ý¸ôU%
Ñɱ
ÉÑUÁ½Ý¸ ´Ä¤(U%
ÑɱMÑ1¥µ¥Ð ´Ä°ÈÀ°È¤(ÀÌØíIÍÕ±ÐôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÐÀ°ÐÀ°ÄÔÀ°ÈÀ°  ¥Ñ=H ÀÌØíM}UQ=!M
I=10°ÀÌØíM}I=91d¤¤)U%MÑMÑÑ ¤()]¡¥±Ä(ÀÌØíµÍôU%Ñ5Í ¤(MÝ¥Ñ ÀÌØíµÍ(
ÍÀÌØí  ÕÐÄ(U%
ÑɱMÑÑ ÀÌØíIÍձаÅÕ½ÐìÅÕ½Ðì¤(U%
ÑɱMÑÑ ÀÌØíIÍձа}¹ÉÑ¡U%
ÑɱI ÀÌØí9Õµ%¹ÁÕФ¤¤(
ÍÀÌØíU%}Y9Q}
1=M(á¥Ð(¹MÝ¥Ñ )]¹()Õ¹}¹ÉÑ ÀÌØí5á
¡È¤(ÀÌØíAÍÌôÅÕ½ÐìÅÕ½Ðì(¥´ÀÌØíÉÉålÅtôm
¡È¡I¹½´¡Í ÅÕ½ÐìÀÅÕ½Ðì¤°Í ÅÕ½ÐíhÅÕ½Ð줤¥t(ÀÌØí¤ôÄ(ÀÌØí¤ÈôÀ(¼(}ÉÉå ÀÌØíÉÉä°
¡È¡I¹½´¡Í ÅÕ½ÐìÀÅÕ½Ðì¤°Í ÅÕ½ÐíhÅÕ½Ð줤¤¤(ÀÌØí¤ôÀÌØí¤¬Ä(U¹Ñ¥°ÀÌØí¤ôÀÌØí5á
¡È(¼(ÀÌØíAÍ̵ÀìôÀÌØíÉÉålÀÌØí¤Ét(ÀÌØí¤ÈôÀÌØí¤È¬Ä(U¹Ñ¥°ÀÌØí¤ÈôÀÌØí5á
¡È(IÑÕɸÀÌØíAÍÌ)¹Õ¹
Edited by Forsaken
Link to comment
Share on other sites

  • Developers

Why are you using this "complex" approach? isn't this the same ?

Func _Generate($MaxChar)
    $Pass = ""
    For $x = 1 to $MaxChar
        $Pass &= Chr(Random(Asc("0"), Asc("Z")))
    Next
    Return $Pass
EndFunc  ;==>_Generate

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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