AutoHotkey Community

It is currently May 24th, 2012, 8:26 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: March 17th, 2007, 3:26 am 
Offline

Joined: November 18th, 2005, 11:18 pm
Posts: 25
Location: Germany
...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
:D

_________________
greets Grendel


Report this post
Top
 Profile  
Reply with quote  
 Post subject: thanks!
PostPosted: January 5th, 2008, 12:00 pm 
Offline

Joined: August 21st, 2006, 4:29 am
Posts: 30
Thank you everybody - I love the final script it's gorgeous! :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 27th, 2011, 10:27 pm 
Offline

Joined: February 16th, 2010, 4:01 am
Posts: 60
I like this script so included it in these other password scripts:

http://www.autohotkey.com/forum/viewtopic.php?t=63156

http://www.autohotkey.com/forum/viewtopic.php?p=455057


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], lblb, Scratch, teadrinker and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group