Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XBasic 0.56 KB | None | 0 0
  1.   Dim vPassword as String
  2.   Dim vKategorie as Integer
  3.   Dim i as Integer
  4.   Dim r as Random
  5.   r = New Random
  6.  
  7.   For i=1 to Val(Length.text)
  8.     vKategorie = r.InRange(1, 3)
  9.     if vKategorie = 1 then
  10.       //--Zahlen
  11.       vPassword = vPassword + Chr(r.InRange(48, 57))
  12.     end if
  13.     if vKategorie = 2 then
  14.       //--Großbuchstaben
  15.       vPassword = vPassword + Chr(r.InRange(65, 90))
  16.     end if
  17.     if vKategorie = 3 then
  18.       //--Kleichbuchstaben
  19.       vPassword = vPassword + Chr(r.InRange(97, 122))
  20.     end if
  21.   Next
  22.  
  23.   Password.Text = vPassword
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement