Jump to content

ini password help


Recommended Posts

Hello, I need help with getting a password from an ini file I don't completely understand how to do it.

my code...

$password1 = IniRead($username3 &".ini", $username3, "Password", )

I don't know what to put in the last part for it to check to see if it is the right password. Any help would be appreciated.

Link to comment
Share on other sites

The last optional parameter is a default value to return if an ini value is not found.

If thats not what you mean then you just have to check it against your password

If $password1 = "yourpassword" Then
   Msgbox(0,"YAY!!","Correct"}
Else
   Msgbox(0,"BOOOOO!!","Incorrect")
EndIf
Exit
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I mean to check it against my own password so that way it checks to see if they are the same.

For example...

$password = inputbox("Password", "Please type in the password you wish to use.")
IniWrite("Account.ini", "Account", "Password", $password)
$passwordbox = inputbox("Password", "Please input the password")

If $passwordbox = ??? then
msgbox(0, "Yay", "Correct")
else
msgbox(0, "Aww", "Incorrect")
endif

I don't know how to get the password from the ini file like that.

Edited by Donald8274
Link to comment
Share on other sites

Possibly

$password = inputbox("Password", "Please type in the password you wish to use.")
IniWrite("Account.ini", "Account", "Password", $password)
$passwordcheck = IniRead("Account.ini", "Account", "Password" )
$passwordbox = inputbox("Password", "Please input the password")

If $passwordbox = $passwordcheck then
msgbox(0, "Yay", "Correct")
else
msgbox(0, "Aww", "Incorrect")
endif

EDIT: sorry try it again

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...