Jump to content

Cancel Button doesn´t work


Recommended Posts

helly guys,

I got a problem with my script.

I want it to close whenever i press cancel but i must have done something wrong.

$i = InputBox("Passwordcheck","Insert Password","","*")
If $i = "hlMG83csk" Then
    MsgBox(0,"Sucess","Correct Password")
    Exit
ElseIf $i <> "hlMG83csk" Then
    MsgBox(0,"FAIL","Wrong password try again")
ElseIf @error = 1 Then
        Exit
        EndIf
While 1
    $i = InputBox("Passwordcheck","Insert Password","","*")
    If $i = "hlMG83csk" Then
        MsgBox(0,"Sucess","Correct Password")
        Exit
    ElseIf $i <> "hlMG83csk" Then
        MsgBox(0,"FAIL","Wrong password try again")
    ElseIf @error = 1 Then
            Exit
            EndIf
    WEnd
Link to comment
Share on other sites

While 1
    If InputBox("Passwordcheck", "Insert Password", "", "*") = "hlMG83csk" Then Exit MsgBox(0, "Sucess", "Correct Password")
    if MsgBox(5, "FAIL", "Wrong password try again") = 2 then Exit
WEnd

Edited by forumer100

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

$i = InputBox("Passwordcheck", "Insert Password", "", "*")
If $i = "hlMG83csk" Then
    MsgBox(0, "Sucess", "Correct Password")
    Exit
ElseIf @error = 1 Then
    Exit
ElseIf $i <> "hlMG83csk" Then
    MsgBox(0, "FAIL", "Wrong password try again")
EndIf

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

@ Forumer100 i want to get the program to exit whenever I press the cancel button in the inputbox.

The Messagebox works fine.

@ JohnOne your solution doesn´t work, but i don´t know why

Link to comment
Share on other sites

Heare you go,

this is all that your script need

While 1
    $i = InputBox("Passwordcheck","Insert Password","","*")
    If @error = 1 Then Exit
    Select
        Case $i = "hlMG83csk"
            MsgBox(0,"Sucess","Correct Password")
            Exit
        Case Else
            MsgBox(0,"FAIL","Wrong password try again")
    EndSelect
WEnd

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

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