![]() Set numberOfCharacters to numberOfCharacters as integerĭisplay dialog “The text entered must be a number!”īut there’s something screwy now because I’m not sure it’s actually generating a password. ( display dialog “Password Rules” & r & r & “All passwords must have at least 12 characters, so how many characters would you like?” default answer “12”) Set numberOfCharacters to text returned of ¬ If (button returned of the result is “Not Now”) then error number -128 – “User canceled” So the script now looks like this (couldn’t work out how to get the AppleScript thing to work in the post, sorry)ĭisplay dialog “Random Password generator” & r & r & “A small application to quickly and easily generated random secure passwords” buttons ¬ … but the setting the numbers and characters bit is really throwing me. I really do genuinely appreciate it.” buttons ¬ I’m fairly certain I know how to get the dialogue boxes to appear because I’ve done scripts with these in them before …ĭisplay dialog “Thanks for your donation. ![]() When they hit this button it needs to take them through to a further dialogue box showing the password and three buttons - copy password and quit, copy and generate another password, quit. I want to set the number of numbers and special characters into the password to something like one of each for a 12 character password, 2 of each for 13-23 character passwords, 3 of each for 24-34 character passwords and 4 of each for any password that has 35-50 characters. When people run the script ideally I want to make initially open up a dialogue box giving users the ability to set the password length (with a 12 character default minimum) and a button say something like, “Generate”. Set thePassword to thePassword & randomCharacter Set randomCharacter to some character of theCharacters I’m trying to write a fairly simple script (to be turned into an app) to generate random passwords for a NGO that I’m working with. I’m a bit of a rookie when it comes to AppleScript and I could do with a hand, if anyone can help please?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |