Hilfe bei GuiScript 'Butten drücken'

  • Also Ich bräuchte bitte einmal Hilfe bei einem meiner Scripts:

    Es soll wenn man den Butten 'Auswerten' drückt eine MsgBox erscheinen. Doch ich weiß nicht wie ich das machen soll.
    Wenn ich das mit
    Case $msg = $Auswerten
    MsGBox (0, "Auswertung", "Der Butten Auswerten wurde gedrückt.")
    mach kommt immer ein Error.

    Was hab ich falsch gemacht?

    Das komplette Script:

    [autoit]

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

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

    #Region ### START Koda GUI section ### Form=c:\programme\autoit3\scite\koda\forms\h2112test_2.kxf
    $H2112_1 = GUICreate("H2112", 241, 483, 193, 123)
    GUISetBkColor(0xA0A0A4)
    $H2112 = GUICtrlCreateGroup("H2112", 8, 0, 225, 361)
    $Geschlecht = GUICtrlCreateGroup("Geschlecht", 24, 32, 121, 73)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Maennlich = GUICtrlCreateCheckbox("Männlich", 40, 56, 81, 17)
    $Weiblich = GUICtrlCreateCheckbox("Weiblich", 40, 80, 81, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Geburtsdatum = GUICtrlCreateGroup("Geburtsdatum", 24, 112, 121, 121)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Jahr = GUICtrlCreateCombo("Jahr", 40, 136, 81, 25)
    GUICtrlSetData(-1, "2010|2009|2008|2007|2006|2005|2004|2003|2002|2001|2000|1999|1998|1997|1996|1995|1994|1993|1992|1991|1990|1989|1988|1987|1986|1985|1984|1983|1982|1981|1980|1979|1978|1977|1976|1975|1974|1973|1972|1971|1970|1969|1968|1967|1966|1965|1964|1963|1962|1961|1960|1959|1958|1957|1956|1955|1954|1953|1952|1951|1950|1949|1948|1947|1946|1945|1944|1943|1942|1941|1940|1939|1938|1937|1936|1935|1934|1933|1932|1931|1930|1929|1928|1927|1926|1925|1924|1923|1922|1921|1920|1919|1918|1917|1916|1915|1914|1913|1912|1911|1910|1909|1908|1907|1906|1905|1904|1903|1902|1901|1900")
    $Monat = GUICtrlCreateCombo("Monat", 40, 168, 81, 25)
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
    $Tag = GUICtrlCreateCombo("Tag", 40, 200, 81, 25)
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $NachVorname = GUICtrlCreateGroup("NachVorname", 24, 240, 121, 89)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Vorname = GUICtrlCreateInput("Vorname", 32, 264, 97, 21, 0)
    GUICtrlSetCursor (-1, 5)
    $Nachname = GUICtrlCreateInput("Nachname", 32, 296, 97, 21)
    GUICtrlSetCursor (-1, 5)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Auswerten = GUICtrlCreateButton("Auswerten", 160, 328, 57, 25, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $H_2112 = GUICtrlCreatePic("D:\_bnt8x-dta\Eigene Dateien\Eigene Bilder\H2112\H2112 Logo_10.bmp", 12, 376, 217, 97, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUICtrlSetTip(-1, "http://h2112.webs.com")
    GUICtrlSetCursor (-1, 0)
    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 $H2112_1

    Case $H2112_1

    Case $H2112_1

    EndSwitch
    WEnd

    [/autoit]
    Zitat

    [Heute, 11:39] Raupi: Soll ich es dir machen?
    [Heute, 11:47] BugFix: "Soll ich es dir machen? " - also Raupi !! bitte nicht so öffentlich :rofl:

    Zitat

    [Heute, 11:51] BugFix: und ich werde es mir jetzt machen - das Mittagessen :P

    AMsg UDF v1.00.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%
    OwnStyle UDF Version 1.10.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%

    3 Mal editiert, zuletzt von H2112 (31. Oktober 2010 um 14:46)

    • Offizieller Beitrag
    Spoiler anzeigen
    [autoit]

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

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

    #Region ### START Koda GUI section ### Form=c:\programme\autoit3\scite\koda\forms\h2112test_2.kxf
    $H2112_1 = GUICreate("H2112", 241, 483, 193, 123)
    GUISetBkColor(0xA0A0A4)
    $H2112 = GUICtrlCreateGroup("H2112", 8, 0, 225, 361)
    $Geschlecht = GUICtrlCreateGroup("Geschlecht", 24, 32, 121, 73)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Maennlich = GUICtrlCreateCheckbox("Männlich", 40, 56, 81, 17)
    $Weiblich = GUICtrlCreateCheckbox("Weiblich", 40, 80, 81, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Geburtsdatum = GUICtrlCreateGroup("Geburtsdatum", 24, 112, 121, 121)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Jahr = GUICtrlCreateCombo("Jahr", 40, 136, 81, 25)
    GUICtrlSetData(-1, "2010|2009|2008|2007|2006|2005|2004|2003|2002|2001|2000|1999|1998|1997|1996|1995|1994|1993|1992|1991|1990|1989|1988|1987|1986|1985|1984|1983|1982|1981|1980|1979|1978|1977|1976|1975|1974|1973|1972|1971|1970|1969|1968|1967|1966|1965|1964|1963|1962|1961|1960|1959|1958|1957|1956|1955|1954|1953|1952|1951|1950|1949|1948|1947|1946|1945|1944|1943|1942|1941|1940|1939|1938|1937|1936|1935|1934|1933|1932|1931|1930|1929|1928|1927|1926|1925|1924|1923|1922|1921|1920|1919|1918|1917|1916|1915|1914|1913|1912|1911|1910|1909|1908|1907|1906|1905|1904|1903|1902|1901|1900")
    $Monat = GUICtrlCreateCombo("Monat", 40, 168, 81, 25)
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12")
    $Tag = GUICtrlCreateCombo("Tag", 40, 200, 81, 25)
    GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $NachVorname = GUICtrlCreateGroup("NachVorname", 24, 240, 121, 89)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Vorname = GUICtrlCreateInput("Vorname", 32, 264, 97, 21, 0)
    GUICtrlSetCursor(-1, 5)
    $Nachname = GUICtrlCreateInput("Nachname", 32, 296, 97, 21)
    GUICtrlSetCursor(-1, 5)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Auswerten = GUICtrlCreateButton("Auswerten", 160, 328, 57, 25, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $H_2112 = GUICtrlCreatePic("D:\_bnt8x-dta\Eigene Dateien\Eigene Bilder\H2112\H2112 Logo_10.bmp", 12, 376, 217, 97, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    GUICtrlSetTip(-1, "http://h2112.webs.com")
    GUICtrlSetCursor(-1, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Auswerten
    MsgBox(0,0,0)

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

    Case $H2112_1

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

    Case $H2112_1

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

    Case $H2112_1

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

    EndSwitch
    WEnd

    [/autoit]
  • Danke für die schnelle Antwort. Ich musste nicht einmal 1 Minute warten. :D

    So und jetzt kommt gleich die nächste Frage (damit ich kein neues Thema aufmachen muss):

    Ich will das in der MsgBox angezeigt wird was man ausgewählt hat.

    zB:

    Sie sind männlich.
    Sie heißen Sepp Mayer.
    Sie sind am 23.04.1979 geboren worden.

    (Soll alles in einer MsgBox stehen)

    Ich bin noch ein ziemlicher Anfänger in AutoIt, deswegen kann ich das mit den Variablen nicht so gut.

    Zitat

    [Heute, 11:39] Raupi: Soll ich es dir machen?
    [Heute, 11:47] BugFix: "Soll ich es dir machen? " - also Raupi !! bitte nicht so öffentlich :rofl:

    Zitat

    [Heute, 11:51] BugFix: und ich werde es mir jetzt machen - das Mittagessen :P

    AMsg UDF v1.00.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%
    OwnStyle UDF Version 1.10.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%

    Einmal editiert, zuletzt von H2112 (14. Februar 2009 um 15:42)

  • So jetzt hab ichs verstanden. Danke ;)

    Zitat

    [Heute, 11:39] Raupi: Soll ich es dir machen?
    [Heute, 11:47] BugFix: "Soll ich es dir machen? " - also Raupi !! bitte nicht so öffentlich :rofl:

    Zitat

    [Heute, 11:51] BugFix: und ich werde es mir jetzt machen - das Mittagessen :P

    AMsg UDF v1.00.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%
    OwnStyle UDF Version 1.10.00 IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 100%

    Einmal editiert, zuletzt von H2112 (14. Februar 2009 um 18:08)