GUI

  • hi ich habe mal wieder eine frage
    ich habe mit koda ein fenter gemacht , das ist ja auch nicht schwer.
    doch jetzt meine frage.
    wie bekomme ich es hin, dass wenn ich ein button klicke etwas passiert.
    gut das war es schon.
    bis dann euer MANNY

  • mh ich habe das immer noch nicht hinbekommen
    weiß nicht was ich flasch mache
    vllt kann mir jemand mal ein kleines bsp machen zu den hier

    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 451, 193, 125)
    $Button1 = GUICtrlCreateButton("Button1", 128, 72, 225, 97, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    EndSwitch
    WEnd
    wenn der button geklickt wird soll ein msg kommen
    ps help
    danke schon mal
    euer MANNY

  • hi

    [autoit]


    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 451, 193, 125)
    $Button1 = GUICtrlCreateButton("Button1", 128, 72, 225, 97, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Button1
    msgbox(0,'nanu?!','halihalo')
    EndSwitch
    WEnd

    [/autoit]
  • hi ich mal wieder
    jetzt habe ich ein neues problem

    hier mal mein script (nur übung)

    HotKeySet("{ESC}" , "Terminate")
    Func Terminate()
    Exit
    EndFunc
    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 451, 193, 125)
    GUICtrlCreateLabel("", 80, 0, 4, 4)
    $KNUDDELS = GUICtrlCreateLabel("KNUDDELS", 240, 0, 63, 17)
    $Input1 = GUICtrlCreateInput("Hier kommt dein text rein", 144, 56, 289, 21)
    $nr1 = GUICtrlCreateLabel("nr1", 104, 56, 19, 17)
    $nr2 = GUICtrlCreateLabel("nr2", 104, 112, 19, 17)
    $Input2 = GUICtrlCreateInput("Hier kommt noch ein Text rein", 144, 104, 289, 21)
    $Start = GUICtrlCreateButton("Start", 200, 168, 201, 33, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Start
    msgbox(0,'Start','Loß geht es')
    EndSwitch
    WEnd
    meine frage ist jetzt
    ich habe ja 2 edit felden in mein script.
    dann soll der start button geklickt werden.
    dann soll das script gestartet werden.
    und wenn nix in den edit felder eingegeben wurde
    soll eine fehler meldung kommen.
    okay BB
    euer manny

    Einmal editiert, zuletzt von manny89 (30. März 2008 um 09:59)

  • Evtl. sowas an der Stelle wo steht was passieren soll wenn man auf Start klickt

    [autoit]


    If GUICtrlRead($Input1) = "" Then ; If GUICtrlRead($Input1) = "" AND If GUICtrlRead($Input2) = "" Then
    myscript()
    Else
    other_things_todo()

    [/autoit]

    Achtung Anfänger! :whistling:

    Betrachten des Quellcodes auf eigene Gefahr, bei Übelkeit,Erbrechen,Kopfschmerzen übernehme ich keine Haftung. 8o