Sign in to follow this  
Followers 0
b1t5tR3@m

Password Validation

5 posts in this topic

I've been searching the forums and have yet to run across a script addressing simple Password Validation. Nothing fancy or elaborate, doesn't even need to loop for the user to keep trying. Just a simple script front-end for the rest of the script, requiring an authenticated password before continuing.

I know this may be extremely simple for a few of you, and nothing spectacular...however I would appreciate any help offered.

Thnkx

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$sPass = 'My secret password'

Do 
   $sInput = InputBox( "Password", "Insert password to continue"& @lf &"The password is CaSe SeNSiTIve." , "" , ".")
   If @error Then Exit
Until $sPass == $sInput

;Real script here. Remember to deactivate decompiling when compiling.

Edited by ezzetabi

Share this post


Link to post
Share on other sites

With a simple error message:

$sPass = 'My secret password'

Do
   $sInput = InputBox( "Password", "Insert password to continue" & @LF & "The password is CaSe SeNSiTIve.", "", ".")
   If @error Then Exit
   
   If $sPass == $sInput Then ExitLoop
   
   MsgBox(4096 + 16, 'Error!', 'Password didn''t match.' & @LF & 'Try again.')
Until 0

Share this post


Link to post
Share on other sites

ezzetabi.......Thanks

Just don't have the time I'd like, to put in to learning this script language the way I'd like to.

Thanks again...

Share this post


Link to post
Share on other sites

You could morph that into a for loop if you only want to allow a certain amount of tries.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0