Sign in to follow this  
Followers 0
Guest Beefteck

Password Input Window

4 posts in this topic

Hey guys! Just making a little program for my brother and I was hoping at the start of the program I can have a little password enter window.

Here is the code I want to edit:

$passwd = InputBox("Security Check", "Enter your password.", "" , "*")

Simple code. That I am going to put at the begining of the script I have. How would I make it need a password and if the password is wrong, to send an error message with it closing.? Any help would be great.

Thanks so much Autoit Members!!! ;)

-Beefteck

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$password = "Password to check for here"
$input = InputBox("Security Check", "Enter your password.", "", "*")

If $input <> $password Then
    MsgBox(0, "Error", "Incorrect password. Press OK to exit.")
    Exit
EndIf

Toss that at the start of your script.

Edit: Added the message box you were wanting.

Edited by mikehunt114

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

nice this is what i needed, thanks for the help mikehunt114

-Beefteck

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