In ner FUNC n GuiCtrlRead

  • [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    Func _MsgBox()
    $Input1 = GUICtrlRead ($Input1)
    MsgBox (1,"GuiCtrlRead", $Input1)
    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    _MsgBox()

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

    EndSwitch
    WEnd

    [/autoit]

    So, folgendes Problem:
    Der mach die GUICtrlREad irwie net ;(

    Habt ihr ne Lösung?

    MFG EliteMattthias

    SCRIPT WURDE EDITIRT ^^

    Es gibt sehr viele Leute, die glauben. Aber aus Aberglauben.
    - Blaise Pascal

  • Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _MsgBox()
    EndSwitch
    WEnd

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

    Func _MsgBox()
    MsgBox(1, "GuiCtrlRead", GUICtrlRead($Input1))
    EndFunc ;==>_MsgBox

    [/autoit]
  • ich möchte aber das der auf Knopfdruck von button 1 die Func macht ;(

    Irwie habe ich wieder ein Problem:

    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _MsgBox()
    EndSwitch
    WEnd

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

    Func _MsgBox()
    MsgBox(1, "GuiCtrlRead", GUICtrlRead($Input1))
    EndFunc ;==>_MsgBox

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

    Case $Button1
    _MsgBox()

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

    EndSwitch
    WEnd

    [/autoit]

    Der meldet nen Syntax Error ;(

    Es gibt sehr viele Leute, die glauben. Aber aus Aberglauben.
    - Blaise Pascal

  • Ja genau DAS macht das Script von ideas ;)

    Der Fehler liegt hier (grün markiertes):

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _MsgBox()
    EndSwitch
    WEnd ;Hier ist die Schleife zuende!

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

    Func _MsgBox()
    MsgBox(1, "GuiCtrlRead", GUICtrlRead($Input1))
    EndFunc ;==>_MsgBox

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

    #cs
    Case $Button1 ;Das Case MUSS in der While Schleife sein, die jedoch schon oben mit WEnd abgeschlossen ist
    _MsgBox()

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

    EndSwitch
    WEnd
    #ce

    [/autoit]

    Nimm einfach das unten grün markierte heraus, dann funktionierts.

  • Das tut er doch auch.
    Hier ein bisschen korriegiert:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _MsgBox()
    EndSwitch
    WEnd

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

    Func _MsgBox()
    MsgBox(1, "GuiCtrlRead", GUICtrlRead($Input1))
    EndFunc ;==>_MsgBox

    [/autoit]


    Edit: Zu spät :(
    Es gibt wohl keinen schnelleren Support als AutoIt.de :D
    Edit2: So jetzt stimmts, auch wenn es sowieso schon gelöst ist.

  • Hallo eliteMatthias,

    machs doch einfach so:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 188, 122)
    Global $Input1 = GUICtrlCreateInput("Input1", 92, 60, 169, 21)
    $Button1 = GUICtrlCreateButton("Button1", 96, 204, 37, 45, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    _MsgBox()

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

    EndSwitch
    WEnd

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

    Func _MsgBox()
    $Input = GUICtrlRead($Input1)
    MsgBox(1, "GuiCtrlRead", $Input)
    EndFunc ;==>_MsgBox

    [/autoit]

    name22, deines kann nicht laufen,

    mfg (Auto)Bert