Jump to content

Need help...


Roofel
 Share

Recommended Posts

Hello:) I just need to know how to get this working. I am in need of a script that asks for Password before going onto the next "window"(Gonna put different stuff there). I figured out how to get it in there, made the script for the "cancel" and "x" button in the window.

But here is the actual question:)

How can i get the real "password check" made? I looked through different of the Helpfiles but cant get anything matching:S

Here is what i have gotten so far, Im kinda new to this so take it easy on me and dont explain way to complicated:P

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Password", 123, 62, 270, 176)
$Input1 = GUICtrlCreateInput("",0,0,121,24)
GUICtrlSetFont(-1, 9, 800, 0, "Comic Sans MS")
$Button1 = GUICtrlCreateButton("Ok", 0, 24, 57, 33, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
$Button2 = GUICtrlCreateButton("Cancel", 64, 24, 57, 33, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $Msg = GUIGetMsg()
    If $Input1="---" Then GUICreate("Correct Password", "Access granted");This is going to be changed:)
    If Not $Input1="----" Then ContinueLoop; This is going to be changed to:P
    Select
        Case $Msg=$GUI_EVENT_CLOSE
            Exit
        Case $Msg=$Button2
            Exit
    EndSelect
WEnd

Hope you can help, might be totally of course>.<

Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Link to comment
Share on other sites

try this:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Password", 123, 62, 270, 176)
$Input1 = GUICtrlCreateInput("", 0, 0, 121, 24)
GUICtrlSetFont(-1, 9, 800, 0, "Comic Sans MS")
$Button1 = GUICtrlCreateButton("Ok", 0, 24, 57, 33, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
$Button2 = GUICtrlCreateButton("Cancel", 64, 24, 57, 33, 0)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            If GUICtrlRead($Input1) = "---"  Then
                GUIDelete($Form1)
                loginok()
            Else
                ContinueLoop
            EndIf
        Case $Button2
            Exit
    EndSwitch
WEnd

Func loginok()
    GUICreate("Correct Password")
    GUISetState(@SW_SHOW)
    While 1
        While 1
            $nMsg = GUIGetMsg()
            Switch $nMsg
                Case $GUI_EVENT_CLOSE
                    Exit

            EndSwitch
        WEnd
    WEnd
EndFunc;==>loginok
Edited by Darklord
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...