hi, This is my first project in AutoIT I only started using it today. It a very basic program that asks the user to enter a length for the password then, one is generated and is copiyed to the clipboard.
Well Hope you may find it usfull it's my first attement as I not used to this cool AutoIT yet, but lucky I done some VB and know a little bit, I hope to update this project to support a GUI as time goes on. Comments are welcome.
#include <StringConstants.au3>
const $pwsMask = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Const $Msg1 = "Your password was copiyed to the clipboard."
const $msgPrompt = "Please enter the size of the password you want to create below:"
Local $len
Local $n
Local $buff
$Len = InputBox("Ben Password Generator v1.0",$msgPrompt,"8")
$len = StringStripWS($len,$STR_STRIPALL)
;Check that user has entered a vaild password length
if not StringIsDigit($len) or $len = 0 Then
MsgBox(48,"Error","Invaild Integer was entered" & @CRLF & "Program will now exit.")
Exit
EndIf
;This creates the random password.
for $i = 1 to $Len
;Pick a random chat between 1 and the pwsMask Length
$n = int(random(1,StringLen($pwsMask)))
;Concat each chat that has been picked out of pwsMask to $buff
$buff = $Buff & StringMid($pwsmask,$n,1)
Next
;Put new password on the clipboard.
ClipPut("Password: " & $buff)
;Inform user password was created
MsgBox(64,"Password",$msg1)
Exit