[Problem]: Art Web-launcher erstellen

  • guten abend zusammen,

    ich ich versuche auf meine webseite ein programm den registrierten nutzer es ermöglicht einen einfachen login per klick zu starten.
    (es handelt sich um einen web-launcher)
    nun ist das problem immer, wenn ich in den weißen inputfeld irgendetwas schreibe kommt eine MsgBox "Erfolg!" oder sonstige probleme auf:(


    Spoiler anzeigen
    [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <IE.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Web-Launcher", 393, 116, 192, 124)

    [/autoit] [autoit][/autoit] [autoit]

    $user = GUICtrlCreateInput("", 88, 16, 201, 21) ;//Inputbox Username.
    $pw = GUICtrlCreateInput("", 88, 48, 201, 21) ;//Inputbox Passwort.

    [/autoit] [autoit][/autoit] [autoit]

    $Label1 = GUICtrlCreateLabel("Name", 24, 16, 32, 17) ;//Label Name.
    $Label2 = GUICtrlCreateLabel("Passwort", 24, 48, 50, 17) ;//Label Passwort.

    [/autoit] [autoit][/autoit] [autoit]

    $sub = GUICtrlCreateButton("Login", 96, 80, 177, 17) ;//Login button.
    $status = ToolTip("User: " & $user & @CRLF & "PW: " & $pw, 0, 0, "Wird geprüft...") ;//Status Account.
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Case $sub ;//Login Starten f.
    Start()
    If $status = "acc_valid" Then ;//Wenn es Flasch/Richtig ist soll eine Msgbox angezeigt werden.
    MsgBox(0, "", "Erfolg!")
    ElseIf $status = "acc_unvalid" Then
    MsgBox(0, "", "Login fehlgeschlagen.")
    Else
    MsgBox(16, "", "An error occurred")
    EndIf
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func Start()
    $url = "http://hiereintest.forumieren.com/login"
    $oIE = _IECreate($url, 0, 0)
    $Form1 = _IEGetObjByName($oIE, "input")

    [/autoit] [autoit][/autoit] [autoit]

    $oInput = _IEFormElementGetObjByName($Form1, "username")
    _IEFormElementSetValue($oInput, $user)
    $oPW = _IEFormElementGetObjByName($Form1, "password")
    _IEFormElementSetValue($oPW, $pw)

    [/autoit] [autoit][/autoit] [autoit]

    _IEFormSubmit($Form1, 0)
    _IELoadWait($oIE)

    [/autoit] [autoit][/autoit] [autoit]

    $txt = _IEBodyReadText($oIE)

    [/autoit] [autoit][/autoit] [autoit]

    $ans = StringRegExp($txt, "Passwort oder Name ist falsch!")

    [/autoit] [autoit][/autoit] [autoit]

    If $ans = 1 Then
    $status = "acc_unvalid"
    Else
    $status = "acc_valid"
    EndIf
    _IEQuit($oIE)
    Return $status
    EndFunc

    [/autoit]