Sign in to follow this  
Followers 0
thomaatje

_Generate

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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

:)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

:) Yeh... you'r right i was thinking a little bit to "complex"... but it works :P Edited by Forsaken

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