Random Password Generator lazarus / 8-Other ---------------------------------------------------------------------- BenJones · 2011-09-04 21:08 Hi this is my Random Password Generator I made today it helpfull when you want to create string random passwords comes with full sourcecode and help file. Hope you like it comments are welcome. ---------------------------------------------------------------------- BigChimp · 2011-09-05 08:39 Hi Ben, Looks great! Clean design, works. Some tips: 1. You could add error handling to the file save routines, something like (untested, air code): Code: [Select]      //Save the list of passwords       try         AssignFile(T, SFD.FileName + '.txt');         Rewrite(T);         //Write the listview contents to the filename         Write(T, ListToString(LstPws));         CloseFile(T);       except         on E: Exception do         begin           MessageDlg('Error writing file. Details: ' + E.Message, mtError, [mbOK], 0);         end;       end; 2. I wouldn't make the Password Options text red as that implies a warning. Maybe blue to match with Generator, or keep it black. You could also draw a GroupBox around the password options to visually indicate these options are related. 3. Being able to copy a generated password to the clipboard would be nice, e.g. via selecting, Ctrl-C, a button, or a right-click menu 4. Instead of showing "Nothing to save" when pressing save if no passwords have been generated, you could also gray out the button (set enabled to false or something like this, can't remember). Only when passwords were succesfully generated, enable the save button. 5. Typos: greater then=>greater than 6. You could factor out the option checking part to a function that returns true when all conditions for proper generation are met. You could include something like (air code): Code: [Select]if (chkUpper.Checked or chkLower.Checked or chkNumber.Checked or chkSpecial.Checked)=false then begin MessageDlg('Please select at least one password option.', mtInformation, [mbOK], 0); result:=false; //user must select at least one option end; Then you don't have to have exit statements all over the place. 7. Your call to randomize might not need to be repeated for each password generation, however I don't think it will harm the results. Somebody with real pascal knowledge should step in here  8. Suppose you're generating millions of passwords. I'd move Code: [Select]  //Set listview header text   LstPws.Column[0].Caption := IntToStr(pNum) + ' passwords generated'; after the generation is complete. Maybe even test for number of passwords > 1 million and if true, set the caption to "Generating xxx passwords. Please wait" before generation. Once again, great working program, only minor niggles. Oh, one question: what did you use to generate the .chm help file? Regards, BigChimp ---------------------------------------------------------------------- BenJones · 2011-09-05 17:08 Hi BigChimp Thanks for the info I look into makeing changes the chm was made in HTML Help workshop, but I updated to pdf pdf was made in openoffice. ---------------------------------------------------------------------- joseme · 2011-12-10 16:00 Downloaded it today, I will try it tomorrow, after that I will send you my comments.