...here is my adaption in english and german...
ENGLISH VERSION:
Code:
;*****************************
;* PASSGEN (ENGLISH VERSION) *
;*****************************
#Persistent
#SingleInstance
SetTitleMatchMode, 1
SetKeyDelay, 0
SetWinDelay, -1
SetBatchLines, -1
;----------------------------------------------------------------------
;************************
;* Initialize Variables *
;************************
APPNAME = Password-Generator
TIPTITLE = «««««« %APPNAME% »»»»»»
;----------------------------------------------------------------------
Menu, Tray, NoStandard
Menu, Tray, Tip, %TIPTITLE%
Gui, Add, GroupBox, x5 y3 w260 h390,
Gui, Add, GroupBox, x16 y30 w130 h140,password contains...
Gui, Add, Checkbox, x26 y47 w115 h30 vCheck1 checked,lower case letters
Gui, Add, Checkbox, x26 y77 w115 h30 vCheck2 checked,capital letters
Gui, Add, Checkbox, x26 y107 w115 h30 vCheck3 checked,digits
Gui, Add, Checkbox, x26 y137 w115 h30 vCheck4,special chars
Gui, Add, GroupBox, x154 y30 w100 h50,password length
Gui, Add, Edit, x164 y50 w80 h20 vPasslen, 8
Gui, Add, GroupBox, x154 y82 w100 h88, Info
Gui, Add, Text, x161 y97 w90 h69 cBlack, generated password will automatically copied to clipboard!
Gui, Add, Button, x16 y304 w237 h30 Default, &Ok
Gui, Add, Button, x16 y344 w237 h30, &Close
Gui, Add, Edit, x16 y184 w237 h100 vNewPass readonly,
Gui, Show, x285 y161 h398 w271, %APPNAME%
Return
;---------------
GuiEscape:
GuiClose:
ButtonClose:
Gui, Destroy
ExitApp
;---------------
ButtonOk:
Gui, Submit, NoHide ; Save the values of the check buttons.
if (passlen <= 0)
{
msgbox,16, STOP !, Not that way ! *LOL*
GuiControl,, Passlen, 8
GuiControl,, NewPass,
Clipboard =
return
}
if (passlen > 10000)
{
msgbox,64, Info, Attention: Maximum password length is 10000 characters ! ;-)
GuiControl,, Passlen, 10000
GuiControl,, NewPass,
Clipboard =
return
}
strpool =
pass =
chAlpha1 = abcdefghijklmnopqrstuvwxyz
chAlpha2 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
chNumeric = 1234567890
chExtra = !"£$`%^&*()_-=+{}[]`;:``@'#~<>,./?\|¬¦
if (check1 = 0) and (check2 = 0) and (check3 = 0) and (check4 = 0)
{
msgbox,64, Info,Please check a minimum of 1 checkbox !
GuiControl,, NewPass,
GuiControl,, check1,1
GuiControl,, check2,1
GuiControl,, check3,1
Clipboard =
return
}
if Check1 = 1
strpool = %strpool%%chAlpha1%
if Check2 = 1
strpool = %strpool%%chAlpha2%
if Check3 = 1
strpool = %strpool%%chNumeric%
if Check4 = 1
strpool = %strpool%%chExtra%
StringSplit, list, strpool
Loop, % passlen
{
Random, rnd, 1, % list0
i := list%rnd%
pass = %pass%%i%
}
GuiControl,, NewPass, %pass%
Clipboard = %pass%
Return
GERMAN VERSION:Code:
;******************************
;* PASSGEN (Deutsche Version) *
;******************************
#Persistent
#SingleInstance
SetTitleMatchMode, 1
SetKeyDelay, 0
SetWinDelay, -1
SetBatchLines, -1
;----------------------------------------------------------------------
;************************
;* Initialize Variables *
;************************
APPNAME = Password-Generator
TIPTITLE = «««««« %APPNAME% »»»»»»
;----------------------------------------------------------------------
Menu, Tray, NoStandard
Menu, Tray, Tip, %TIPTITLE%
Gui, Add, GroupBox, x5 y3 w260 h390,
Gui, Add, GroupBox, x16 y30 w130 h140,Passwort beinhaltet
Gui, Add, Checkbox, x26 y47 w115 h30 vCheck1 checked,Buchstaben klein
Gui, Add, Checkbox, x26 y77 w115 h30 vCheck2 checked,Buchstaben gross
Gui, Add, Checkbox, x26 y107 w115 h30 vCheck3 checked,Zahlen
Gui, Add, Checkbox, x26 y137 w115 h30 vCheck4,Sonderzeichen
Gui, Add, GroupBox, x154 y30 w100 h50,Passwortlänge
Gui, Add, Edit, x164 y50 w80 h20 vPasslen, 8
Gui, Add, GroupBox, x154 y82 w100 h88, Info
Gui, Add, Text, x161 y97 w90 h69 cBlack, Das generierte Passwort wird automatisch in die Zwischenablage kopiert!
Gui, Add, Button, x16 y304 w237 h30 Default, &Ok
Gui, Add, Button, x16 y344 w237 h30, &Close
Gui, Add, Edit, x16 y184 w237 h100 vNewPass readonly,
Gui, Show, x285 y161 h398 w271, %APPNAME%
Return
;---------------
GuiEscape:
GuiClose:
ButtonClose:
Gui, Destroy
ExitApp
;---------------
ButtonOk:
Gui, Submit, NoHide ; Save the values of the check buttons.
if (passlen <= 0)
{
msgbox,16, Nix da!, So funktioniert das leider nicht! *LOL*
GuiControl,, Passlen, 8
GuiControl,, NewPass,
Clipboard =
return
}
if (passlen > 10000)
{
msgbox,64, Info, Die maximale Passwortlänge beträgt 10000 Zeichen !
GuiControl,, Passlen, 10000
GuiControl,, NewPass,
Clipboard =
return
}
strpool =
pass =
chAlpha1 = abcdefghijklmnopqrstuvwxyz
chAlpha2 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
chNumeric = 1234567890
chSonder = !"£$`%^&*()_-=+{}[]`;:``@'#~<>,./?\|¬¦
if (check1 = 0) and (check2 = 0) and (check3 = 0) and (check4 = 0)
{
msgbox,64, Info,Mindestens ein Zeichentyp muss ausgewählt sein !
GuiControl,, NewPass,
GuiControl,, check1,1
GuiControl,, check2,1
GuiControl,, check3,1
Clipboard =
return
}
if Check1 = 1
strpool = %strpool%%chAlpha1%
if Check2 = 1
strpool = %strpool%%chAlpha2%
if Check3 = 1
strpool = %strpool%%chNumeric%
if Check4 = 1
strpool = %strpool%%chSonder%
StringSplit, list, strpool
Loop, % passlen
{
Random, rnd, 1, % list0
i := list%rnd%
pass = %pass%%i%
}
GuiControl,, NewPass, %pass%
Clipboard = %pass%
Return
