Text einer Input Box auslesen

  • Hallo,

    ich will einen MsgBox generator machen, aber da taucht ein Error auf.

    Code den ich im mom hab:

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("MsgBox Generator | Gugi", 284, 148, 192, 124)
    $Label1 = GUICtrlCreateLabel("Fenstername:", 8, 8, 68, 17)
    $Input1 = GUICtrlCreateInput("", 8, 24, 265, 21)
    $Label2 = GUICtrlCreateLabel("Text:", 8, 48, 28, 17)
    $Input2 = GUICtrlCreateInput("", 8, 72, 265, 21)
    $Button1 = GUICtrlCreateButton("Zeig meine MsgBox!", 8, 104, 265, 33, $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(($Input1),GUICTRLREAD($Input2))

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

    EndSwitch
    WEnd

    [/autoit]


    Ja und ich will Das der MsgBox titel der is den man in die input1 einträgt und der text der msgbox der text der input2
    wie geht das?

    Einmal editiert, zuletzt von Gugi (15. Mai 2010 um 19:42)

  • [autoit]

    $text1 = Guictrlread($Input1)
    $text2 = Guictrlread($input2)
    MsgBox(0,$text1,$text2)

    [/autoit]


    Ganz einfach!

    Jura