Bezug auf Inputfelder

  • Also ich würde ja gerne ein Spiel amchen mit diesen Basisscript für die Eingabefelder:

    [autoit]

    ;spiel
    #include <GUIConstants.au3>
    #Region ### START Koda GUI section ### Form=C:\Users\Christine\Desktop\auto it\Spiel\spiel.kxf
    $Form1 = GUICreate("Form1", 625, 445, 193, 125)
    GUICtrlCreateInput("", 56, 88, 33, 21)
    GUICtrlCreateInput("", 56, 120, 33, 21)
    GUICtrlCreateInput("", 56, 152, 33, 21)
    GUICtrlCreateInput("", 56, 184, 33, 21)
    GUICtrlCreateInput("", 56, 216, 33, 21)
    $Level1 = GUICtrlCreateButton("Level1", 24, 32, 105, 41, 0)
    GUICtrlCreateInput("", 56, 248, 33, 21)
    GUICtrlCreateInput("", 192, 88, 33, 21)
    GUICtrlCreateInput("", 192, 120, 33, 21)
    GUICtrlCreateInput("", 192, 152, 33, 21)
    GUICtrlCreateInput("", 192, 184, 33, 21)
    GUICtrlCreateInput("", 192, 216, 33, 21)
    $Level2 = GUICtrlCreateButton("Level2", 160, 32, 89, 41, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Wie bringe ich jetzt die Felder in eine if then "beziehung" rein.

  • Inwiefern?

    [autoit]


    $Input1 = GUICtrlRead ($Feld1)
    If $Input1 = "Benedikt" Then
    MsgBox (1, "", "Ihr Name ist: "&$Input1&"...")

    [/autoit]

    Und bei den Inputs musst du ne Variabel vorstellen.
    $Feld1 = ...
    $Feld2 = ...