Pw abfrage

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Hi also ich habe probiert mal eine Pw abfrage hinzukriegen und das ist sie
      $EINGABE = "EINGABE"
      $Password = "test"
      $Pass = InputBox("EINGABE", "Geb das Passwort ein")
      If $EINGABE = $Password Then
      MsgBox ( 1, "Right Pw", "Richtiges Passwort" )
      Else
      MsgBox ( 1, "Wrong pw", "Falsches Passwort" )
      EndIf


      Allerdings kommt immer Wrong Pw und ich hab keine Ahnung woran das liegt

      Wäre nett wenn ihr mir helfen könntet
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • Hallo ;D

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

      #Region ### START Koda GUI section ### Form=
      GUICreate("Password Dialog", 251, 97, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
      $passwort = GUICtrlCreateInput("", 8, 32, 233, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
      $Button1 = GUICtrlCreateButton("&OK", 86, 64, 75, 25, 0)
      GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
      $Button2 = GUICtrlCreateButton("&Weiter", 167, 64, 75, 25, 0)
      GUICtrlSetState(-1,$GUI_DISABLE)
      GUISetState(@SW_SHOW)
      #EndRegion ### END Koda GUI section ###

      While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
      Case $GUI_EVENT_CLOSE
      Exit
      Case $Button1
      If GUICtrlRead($passwort) = "123" Then
      GUICtrlSetState($Button2, $GUI_ENABLE)
      Else
      EndIf

      EndSwitch
      WEnd

      Hoffe das du das meinst, ansonsten schreibe es nochmal anders auf :P
    • OMG
      @vorposter
      der fehler is doch offensichtlich
      dass du den ncih siehst ?!?
      naja egal

      @TE

      Quellcode

      1. [COLOR="Red"]$EINGABE = "EINGABE"[/COLOR]
      2. $Password = "test"
      3. [COLOR="Yellow"]$Pass = InputBox("EINGABE", "Geb das Passwort ein")[/COLOR]
      4. If [COLOR="Red"]$EINGABE[/COLOR] = $Password Then
      5. MsgBox ( 1, "Right Pw", "Richtiges Passwort" )
      6. Else
      7. MsgBox ( 1, "Wrong pw", "Falsches Passwort" )
      8. EndIf

      Das rote ist der fehler
      Wenn du der variable Eingabe den wert test zuweist, klappts
      oder du verlgeichst mal die variable pass mit der variable passwort, dann gehts auch
    • [FONT="Century Gothic"][COLOR="DeepSkyBlue"][SIZE="2"]Ja internetfreak hat recht, du solltest das gespeicherte Passwort mit dem eingegebenen vergleichen, jedoch vergleichst du es mit einer Variable($EINGABE) wo du gar nichts eingeben kannst, und die Inputbox hat keinen nutzen mehr, da ihre Daten gar nicht genutzt werden ;D[/SIZE][/COLOR][/FONT]