Jump to content
Sign in to follow this  
fred666777

code wont work...?

Recommended Posts

i cant seem to get this password code it work can anyone help?

#include <GUIConstants.au3>
#include <String.au3>
$File = IniWrite("my pass.ini" , "5" , "1" ,  _StringEncrypt(1 , "5" , "" , 1))
$Pass = IniRead($File , GUICtrlRead($asdf) , "1" , GUICtrlRead($asdf))
$Form1 = GUICreate("Password Dialog", 252, 200, 0, 0)
$MaskEdit1 = GUICtrlCreateInput("", 8, 32, 233, 21 , $ES_PASSWORD,$ES_AUTOHSCROLL)
$asdf = GUICtrlCreateInput("", 8, 62, 233, 21 , $ES_PASSWORD,$ES_AUTOHSCROLL)
$Button1 = GUICtrlCreateButton("&OK", 86, 90, 75, 25, 0)
$Button2 = GUICtrlCreateButton("&Cancel", 167, 90, 75, 25, 0)
$Label1 = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            If $Pass = GUICtrlRead($MaskEdit1) Then
                ExitLoop
            Else
                MsgBox(0 , "" , "Wrong password")
                Exit
                EndIf
        Case $Button2
            Exit
            EndSwitch
WEnd

Share this post


Link to post
Share on other sites

password code. evey time the program starts they will be given a screen that says what do you want your password to be ($asdf <-- will be the first page that appears that they will enter there password into) then when it closes then it will ask for the password. when i run that code then it says "Variable used without being declared.:"... i have absolutely no idea what that means i tried getting rid of the GUICtrlRead($asdf)s in the $pass line and it worked then but of corse then the password was just nothing...

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  

×
×
  • Create New...