Jump to content

Password Validation


 Share

Recommended Posts

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

Link to comment
Share on other sites

$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
Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...