GUI Frage

  • hallo, ich erstelle mir gerade ein GUI.
    jetzt habe ich da ein kleines problemchen :)

    ich erkläre es mal en diesen kleinen BS:

    [autoit]

    #include <GUIConstants.au3>

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

    $Gui = GUICreate("Test", 146, 133, 704, 397)
    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Exit", 32, 72, 75, 25, 0)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    While 1
    Sleep(10)
    WEnd
    Case $Button2
    Exit
    EndSwitch
    WEnd

    [/autoit]

    wie kann ich die Sleep schleife beim klick auf "exit" beenden?
    mit hotkey ist es kein problem, will es aber mit den button vom GUI haben.
    ich weis auch nicht, was der "Button2" für eine rückmeldung gibt, wenn er gedrückt wird.
    sonst könnte ich es ja mit "AdlibEnable" prüfen.

    Doktore

    • Offizieller Beitrag

    Hi!

    Ein Ansatz:

    [autoit]

    #include <GUIConstants.au3>


    $Gui = GUICreate("Test", 146, 133, 704, 397)
    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Exit", 32, 72, 75, 25, 0)
    GUISetState(@SW_SHOW)


    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    While 1
    $nMsg = GUIGetMsg()
    If $nMsg = $button2 Then Exit
    Sleep(10)
    WEnd
    Case $Button2
    Exit
    EndSwitch
    WEnd

    [/autoit]

    peethebee

  • Hi,
    um den Rückgabewert (ControlID) zu bekommen einfach

    [autoit]


    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    MsgBox(0,"",$Button1)
    EndSwitch
    WEnd

    [/autoit]

    Oder wolltest du das net wissen? :(

    MfG
    Der_Doc

  • ich hoffe ich das ist das was du suchtest:

    [autoit]

    Dim $Exit = False
    Dim $Sleep = ""

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

    $Gui = GUICreate("Test", 146, 133, 704, 397)
    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Exit", 32, 72, 75, 25, 0)
    $Label1 = GUICtrlCreateLabel($Sleep, 32, 10, 100, 15)
    GUISetState(@SW_SHOW)

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


    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    GUICtrlSetData($Label1, "Sleep ist aktiv")
    While $Exit = False
    $nMsg = GUIGetMsg()
    If $nMsg = $Button2 Then
    $Exit = True
    EndIf
    WEnd
    GUICtrlSetData($Label1, "")
    Case $Button2
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Edit: hap "#include <GUIConstants.au3>" vergessen.

    Einmal editiert, zuletzt von Dustin (30. April 2007 um 17:52)

  • hehe männer, echt super eure hilfe!

    nur leider geht das alles nicht :(

    zu eurer entschultigung ist zu sagen, das ich einen kleinen rechtschreib fehler in meinem ersten code hatte :(

    das sleep ist nicht 10 sondern einfach unentlich:
    noch mal das BS:
    ich habe mal 10sec. eingegeben.
    in dieser zeit suche ich eine lösung um das script zu unterbrechen.

    wie gesagt, der hotkey geht:
    wie kann ich den stop bzw. exit button immer aktiv halten.


    und da noch mal das script:

    [autoit]

    HotKeySet("{ESC}", "Terminate")

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

    Func Terminate()
    Exit
    EndFunc

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

    #include <GUIConstants.au3>


    $Gui = GUICreate("Test", 146, 133, 704, 397)
    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Exit", 32, 72, 75, 25, 0)
    GUISetState(@SW_SHOW)


    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    While 1
    Sleep(10000)
    WEnd
    Case $Button2
    Exit
    EndSwitch
    WEnd

    [/autoit]

    edit: der kürzeste durchlauf der schleife ist 91sec.

    Doktore

    Einmal editiert, zuletzt von Dr.Galvany (30. April 2007 um 18:37)

  • Warum nicht kürzer? :D

    Spoiler anzeigen
    [autoit]

    HotKeySet("{ESC}", "Terminate")

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

    Func Terminate()
    Exit
    EndFunc

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

    #include <GUIConstants.au3>


    $Gui = GUICreate("Test", 146, 133, 704, 397)
    $Button1 = GUICtrlCreateButton("Sleep", 32, 40, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Exit", 32, 72, 75, 25, 0)
    GUISetState(@SW_SHOW)


    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE, $Button2
    Exit
    Case $Button1
    $Pause=10000
    While $Pause
    Sleep($Pause)
    $Pause=0
    WEnd
    Case Else
    ;-)))
    EndSwitch
    WEnd

    [/autoit]

    (Allerdings (noch) ungetstet..)
    Gruß
    ytwinky

    (Ich) benutze stets die aktuelle (Beta) und SciTE..

  • liege ich richtig in der annahme, das du alle eingaben unterbinden willst und nur einen button haben willst der funktioniert?
    Ich kann mir keinen anderen grund vorstellen wirso ein script einfach im sleep sein sollte? Sag bitte genauer was du machen willst, ich glaube nämlich das es anders möglich ist.
    Gruss Tamer

  • ytwinky, bischen kürzer :)
    aber wärend der pause geht der exit button auch nicht.

    @Tam0r, es ist keine richtig beabsichtigte pasue.

    ich lade mal einen kleinen teile des echten codes :)
    aber nicht schimpfen, ich weis selbst, das ich das irgend wie sehr komisch erstellt habe :)

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>

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

    $Simulator = GUICreate("Fahrweg Simulator", 715, 553, 448, 372)

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

    $Pic30 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\blau.jpg", 195, 266, 35, 20, BitOR($SS_NOTIFY, $WS_GROUP))

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

    $Pic20 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 619, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic19 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 559, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic18 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 589, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic17 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 529, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic16 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 499, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic15 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 469, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic14 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 439, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic13 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 409, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic12 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 379, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic11 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 349, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic10 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 319, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic9 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 289, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic8 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 259, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic7 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 229, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic6 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 199, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic5 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 169, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic4 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 139, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic3 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 109, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic2 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 79, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic1 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\grün.jpg", 49, 365, 28, 76, BitOR($SS_NOTIFY, $WS_GROUP))

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

    $Pic29 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 627, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic28 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 597, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic27 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 387, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic26 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 357, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic25 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 267, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic24 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 147, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic23 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 117, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic22 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 87, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))
    $Pic21 = GUICtrlCreatePic("D:\Ablage\Programme\AutoIt\scripte\Galvano-Anlage\rot.jpg", 57, 358, 12, 68, BitOR($SS_NOTIFY, $WS_GROUP))

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

    $Label1 = GUICtrlCreateLabel("1", 626, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label2 = GUICtrlCreateLabel("2", 596, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label3 = GUICtrlCreateLabel("3", 566, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label4 = GUICtrlCreateLabel("4", 536, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label5 = GUICtrlCreateLabel("5", 506, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label6 = GUICtrlCreateLabel("6", 476, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label7 = GUICtrlCreateLabel("7", 445, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label8 = GUICtrlCreateLabel("8", 415, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label9 = GUICtrlCreateLabel("9", 385, 445, 15, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label10 = GUICtrlCreateLabel("10", 351, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label11 = GUICtrlCreateLabel("11", 321, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label12 = GUICtrlCreateLabel("12", 290, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label13 = GUICtrlCreateLabel("13", 260, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label14 = GUICtrlCreateLabel("14", 230, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label15 = GUICtrlCreateLabel("15", 200, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label16 = GUICtrlCreateLabel("16", 170, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label17 = GUICtrlCreateLabel("17", 140, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label18 = GUICtrlCreateLabel("18", 109, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label19 = GUICtrlCreateLabel("19", 79, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $Label20 = GUICtrlCreateLabel("20", 50, 445, 26, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

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

    $GroupBox1 = GUICtrlCreateGroup("", 36, 17, 249, 185)

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

    $Label21 = GUICtrlCreateLabel("Produkt Name:", 92, 41, 142, 28)
    GUICtrlSetFont(-1, 13, 800, 4, "MS Sans Serif")

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

    $Label22 = GUICtrlCreateLabel("Version: 1.0", 125, 95, 60, 17)

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

    $Label23 = GUICtrlCreateLabel("Copyright: Michael Schmitt", 92, 137, 129, 17)

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

    $Label24 = GUICtrlCreateLabel("Comments: Alte Gestell-Anlage", 84, 161, 148, 17)

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

    $Label25 = GUICtrlCreateLabel("Anlagen Simulator", 115, 75, 89, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Group2 = GUICtrlCreateGroup("Automatik", 519, 63, 137, 113, $BS_CENTER)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Group1 = GUICtrlCreateGroup("Farbe", 351, 71, 121, 97)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Group3 = GUICtrlCreateGroup("Gestell - Anlage", 25, 237, 649, 265)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    $Label26 = GUICtrlCreateLabel("Grundstellung", 280, 504, 150, 28)
    GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x008000)

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

    $Radio1 = GUICtrlCreateRadio("Gelb", 375, 98, 57, 17)
    GUICtrlSetState($Radio1, $GUI_CHECKED)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
    $Radio2 = GUICtrlCreateRadio("Schwarz", 375, 126, 89, 17)
    GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")

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

    $Button1 = GUICtrlCreateButton("Start", 550, 87, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Stop", 550, 133, 75, 25, 0)

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

    GUISetState(@SW_SHOW)

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

    $fpos = 266
    $fpos1 = 615
    $fpos1_5 = 600
    $fpos2 = 585
    $fpos2_5 = 570
    $fpos3 = 555
    $fpos3_5 = 540
    $fpos4 = 525
    $fpos4_5 = 510
    $fpos5 = 495
    $fpos5_5 = 480
    $fpos6 = 465
    $fpos6_5 = 450
    $fpos7 = 435
    $fpos7_5 = 420
    $fpos8 = 405
    $fpos8_5 = 390
    $fpos9 = 375
    $fpos9_5 = 360
    $fpos10 = 345
    $fpos10_5 = 330
    $fpos11 = 315
    $fpos11_5 = 300
    $fpos12 = 285
    $fpos12_5 = 270
    $fpos13 = 255
    $fpos13_5 = 240
    $fpos14 = 225
    $fpos14_5 = 210
    $fpos15 = 195
    $fpos15_5 = 180
    $fpos16 = 165
    $fpos16_5 = 150
    $fpos17 = 135
    $fpos17_5 = 120
    $fpos18 = 105
    $fpos18_5 = 90
    $fpos19 = 75
    $fpos19_5 = 60
    $fpos20 = 45

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

    $wtpos_o = 287
    $wtpos_om = 310
    $wtpos_um = 335
    $wtpos_u = 358

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

    $ko = -12 ; Träger - 12 !!

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

    $Pic00 = $Pic24

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

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

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

    Case $Button1
    While 1
    _17()
    _18()
    _19()
    WEnd

    Case $Button2
    _grund()
    EndSwitch
    WEnd

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

    Func _17()
    $Pic24 = $Pic00
    _l15_17()
    ControlSetText("", "", $Label26, "Zinkbad")
    _h17()
    _v17_16()
    ControlSetText("", "", $Label26, "Spüle")
    _s16_24()
    _h16_24()
    _v16_15()
    _s15()
    _l15_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _h1()
    _v1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _s11()
    _l11_2()
    ControlSetText("", "", $Label26, "Trockner")
    _h2()
    _v2_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _s1()
    _l1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _h11()
    _v11_12()
    ControlSetText("", "", $Label26, "Spüle")
    _s12()
    _h12()
    _v12_16()
    _s16_29()
    _h16_29()
    _v16_17()
    ControlSetText("", "", $Label26, "Zinkbad")
    _s17()
    _l17_15()
    ControlSetText("", "", $Label26, "Spüle")
    _h15()
    _v15_14()
    _s14()
    _l14_9()
    _h9()
    If GUICtrlRead($Radio1) = 1 Then _gelb() ; Gelb Chromatieren
    If GUICtrlRead($Radio2) = 1 Then _schw() ; Schwarz Chromatieren
    ControlSetText("", "", $Label26, "Spüle")
    _s6()
    _h6()
    _v6_5()
    _s5()
    _h5()
    _v5_2()
    ControlSetText("", "", $Label26, "Trockner")
    _s2()
    _l2_14()
    ControlSetText("", "", $Label26, "Spüle")
    _h14()
    _v14_9()
    _s9()
    _l9_15()
    ControlSetText("", "", $Label26, "Grundstellung")
    Sleep(2000) ; Grundstellung
    _grund()
    EndFunc ;==>_17

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

    Func _18()
    $Pic24 = $Pic23
    _l15_18()
    ControlSetText("", "", $Label26, "Zinkbad")
    _h18()
    _v18_16()
    ControlSetText("", "", $Label26, "Spüle")
    _s16_24()
    _h16_24()
    _v16_15()
    _s15()
    _l15_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _h1()
    _v1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _s11()
    _l11_2()
    ControlSetText("", "", $Label26, "Trockner")
    _h2()
    _v2_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _s1()
    _l1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _h11()
    _v11_12()
    ControlSetText("", "", $Label26, "Spüle")
    _s12()
    _h12()
    _v12_16()
    _s16_29()
    _h16_29()
    _v16_18()
    ControlSetText("", "", $Label26, "Zinkbad")
    _s18()
    _l18_15()
    ControlSetText("", "", $Label26, "Spüle")
    _h15()
    _v15_14()
    _s14()
    _l14_9()
    _h9()
    If GUICtrlRead($Radio1) = 1 Then _gelb() ; Gelb Chromatieren
    If GUICtrlRead($Radio2) = 1 Then _schw() ; Schwarz Chromatieren
    ControlSetText("", "", $Label26, "Spüle")
    _s6()
    _h6()
    _v6_5()
    _s5()
    _h5()
    _v5_2()
    ControlSetText("", "", $Label26, "Trockner")
    _s2()
    _l2_14()
    ControlSetText("", "", $Label26, "Spüle")
    _h14()
    _v14_9()
    _s9()
    _l9_15()
    ControlSetText("", "", $Label26, "Grundstellung")
    Sleep(2000) ; Grundstellung
    _grund()
    EndFunc ;==>_18

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

    Func _19()
    $Pic24 = $Pic22
    _l15_19()
    ControlSetText("", "", $Label26, "Zinkbad")
    _h19()
    _v19_16()
    ControlSetText("", "", $Label26, "Spüle")
    _s16_24()
    _h16_24()
    _v16_15()
    _s15()
    _l15_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _h1()
    _v1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _s11()
    _l11_2()
    ControlSetText("", "", $Label26, "Trockner")
    _h2()
    _v2_1()
    ControlSetText("", "", $Label26, "Be-Endlade")
    _s1()
    _l1_11()
    ControlSetText("", "", $Label26, "HCL 2%")
    _h11()
    _v11_12()
    ControlSetText("", "", $Label26, "Spüle")
    _s12()
    _h12()
    _v12_16()
    _s16_29()
    _h16_29()
    _v16_19()
    ControlSetText("", "", $Label26, "Zinkbad")
    _s19()
    _l19_15()
    ControlSetText("", "", $Label26, "Spüle")
    _h15()
    _v15_14()
    _s14()
    _l14_9()
    _h9()
    If GUICtrlRead($Radio1) = 1 Then _gelb() ; Gelb Chromatieren
    If GUICtrlRead($Radio2) = 1 Then _schw() ; Schwarz Chromatieren
    ControlSetText("", "", $Label26, "Spüle")
    _s6()
    _h6()
    _v6_5()
    _s5()
    _h5()
    _v5_2()
    ControlSetText("", "", $Label26, "Trockner")
    _s2()
    _l2_14()
    ControlSetText("", "", $Label26, "Spüle")
    _h14()
    _v14_9()
    _s9()
    _l9_15()
    ControlSetText("", "", $Label26, "Grundstellung")
    Sleep(2000) ; Grundstellung
    _grund()
    EndFunc ;==>_19

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

    Func _schw()
    _v9_7()
    ControlSetText("", "", $Label26, "Schwarz-Chr.")
    _s7()
    Sleep(2000) ; Chromatieren
    _h7()
    _v7_6()
    EndFunc ;==>_schw

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

    Func _gelb()
    _v9_8()
    ControlSetText("", "", $Label26, "Gelb-Chr.")
    _s8()
    Sleep(2000) ; Chromatieren
    _h8()
    _v8_6()
    EndFunc ;==>_gelb

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

    Func _grund()
    GUICtrlSetPos($Pic30, 195, 266)
    GUICtrlSetPos($Pic29, 627, 358)
    GUICtrlSetPos($Pic28, 597, 358)
    GUICtrlSetPos($Pic27, 387, 358)
    GUICtrlSetPos($Pic26, 357, 358)
    GUICtrlSetPos($Pic25, 267, 358)
    GUICtrlSetPos($Pic24, 147, 358)
    GUICtrlSetPos($Pic23, 117, 358)
    GUICtrlSetPos($Pic22, 87, 358)
    GUICtrlSetPos($Pic21, 57, 358)
    EndFunc ;==>_grund

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

    Func _h1()
    _500()
    GUICtrlSetPos($Pic29, $fpos1 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos1 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos1 - $ko, $wtpos_o)
    EndFunc ;==>_h1

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

    Func _h2()
    _500()
    GUICtrlSetPos($Pic28, $fpos2 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic28, $fpos2 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic28, $fpos2 - $ko, $wtpos_o)
    EndFunc ;==>_h2

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

    Func _h5()
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_o)
    EndFunc ;==>_h5

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

    Func _h6()
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_o)
    EndFunc ;==>_h6

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

    Func _h7()
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_o)
    EndFunc ;==>_h7

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

    Func _h8()
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_o)
    EndFunc ;==>_h8

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

    Func _h9()
    _500()
    GUICtrlSetPos($Pic27, $fpos9 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos9 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos9 - $ko, $wtpos_o)
    EndFunc ;==>_h9

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

    Func _h11()
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_o)
    EndFunc ;==>_h11

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

    Func _h12()
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_o)
    EndFunc ;==>_h12

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

    Func _h14()
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_o)
    EndFunc ;==>_h14

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

    Func _h15()
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_o)
    EndFunc ;==>_h15

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

    Func _h16_24()
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_o)
    EndFunc ;==>_h16_24

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

    Func _h16_29()
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_o)
    EndFunc ;==>_h16_29

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

    Func _h17()
    _500()
    GUICtrlSetPos($Pic24, $fpos17 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos17 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos17 - $ko, $wtpos_o)
    EndFunc ;==>_h17

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

    Func _h18()
    _500()
    GUICtrlSetPos($Pic24, $fpos18 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos18 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos18 - $ko, $wtpos_o)
    EndFunc ;==>_h18

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

    Func _h19()
    _500()
    GUICtrlSetPos($Pic24, $fpos19 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos19 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos19 - $ko, $wtpos_o)
    EndFunc ;==>_h19

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

    Func _s1()
    _500()
    GUICtrlSetPos($Pic28, $fpos1 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic28, $fpos1 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic28, $fpos1 - $ko, $wtpos_u)
    EndFunc ;==>_s1

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

    Func _s2()
    _500()
    GUICtrlSetPos($Pic27, $fpos2 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos2 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos2 - $ko, $wtpos_u)
    EndFunc ;==>_s2

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

    Func _s5()
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos5 - $ko, $wtpos_u)
    EndFunc ;==>_s5

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

    Func _s6()
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos6 - $ko, $wtpos_u)
    EndFunc ;==>_s6

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

    Func _s7()
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos7 - $ko, $wtpos_u)
    EndFunc ;==>_s7

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

    Func _s8()
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic27, $fpos8 - $ko, $wtpos_u)
    EndFunc ;==>_s8

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

    Func _s9()
    _500()
    GUICtrlSetPos($Pic24, $fpos9 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos9 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos9 - $ko, $wtpos_u)
    EndFunc ;==>_s9

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

    Func _s11()
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos11 - $ko, $wtpos_u)
    EndFunc ;==>_s11

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

    Func _s12()
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos12 - $ko, $wtpos_u)
    EndFunc ;==>_s12

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

    Func _s14()
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos14 - $ko, $wtpos_u)
    EndFunc ;==>_s14

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

    Func _s15()
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos15 - $ko, $wtpos_u)
    EndFunc ;==>_s15

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

    Func _s16_29()
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos16 - $ko, $wtpos_u)
    EndFunc ;==>_s16_29

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

    Func _s16_24()
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic24, $fpos16 - $ko, $wtpos_u)
    EndFunc ;==>_s16_24

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

    Func _s17()
    _500()
    GUICtrlSetPos($Pic29, $fpos17 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos17 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos17 - $ko, $wtpos_u)
    EndFunc ;==>_s17

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

    Func _s18()
    _500()
    GUICtrlSetPos($Pic29, $fpos18 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos18 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos18 - $ko, $wtpos_u)
    EndFunc ;==>_s18

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

    Func _s19()
    _500()
    GUICtrlSetPos($Pic29, $fpos19 - $ko, $wtpos_om)
    _500()
    GUICtrlSetPos($Pic29, $fpos19 - $ko, $wtpos_um)
    _500()
    GUICtrlSetPos($Pic29, $fpos19 - $ko, $wtpos_u)
    EndFunc ;==>_s19

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

    Func _l1_11()
    _250()
    GUICtrlSetPos($Pic30, $fpos1_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos2, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos2_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos3, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos3_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos4, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos4_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos5_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos6, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos6_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos7, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos7_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos8, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos8_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos9, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos9_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos10, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos10_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos11, $fpos)
    EndFunc ;==>_l1_11

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

    Func _l9_15()
    _250()
    GUICtrlSetPos($Pic30, $fpos9_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos10, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos10_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos11, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos11_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos12, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos12_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos13, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos13_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos14, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos14_5, $fpos)
    _250()
    GUICtrlSetPos($Pic30, $fpos15, $fpos)
    EndFunc ;==>_l9_15

    [/autoit]

    Doktore

    2 Mal editiert, zuletzt von Dr.Galvany (30. April 2007 um 19:59)

  • hehe, ich hätte eine möglichkeit :)

    der stop button hat die ID 70.

    aber ich kann ihn nicht auslesen, oder habe ich da einen denkfehler?

    [autoit]

    ; bs1
    If GUICtrlRead($Button2) = 70 Then Exit

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

    ;bs2
    If $Button2 = 70 Then Exit

    [/autoit]

    Doktore

  • dein Problem ist das du ein threads brauchst und autoit das nicht unterstützt :)
    das einzige was du wohl machen könntest ist , jeder zeile zu Prüfen ob ein Button gedrückt ist.

    Einmal editiert, zuletzt von Tam0r (30. April 2007 um 23:10)

  • ja das ist ja die lösung die ich davor angesprochen habe.
    da ich nach jeden kleinen schriet eine func pause aufrufe, kann ich diese prüfung hier schön rein packen :)

    nur meine beiden schnipsel gehen nicht :(

    ich muss doch so den "Button2" prüfen, oder?

    Doktore

  • Zitat

    Dr.Galvany

    [autoit]

    ; bs1
    If GUICtrlRead($Button2) = 70 Then Exit

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

    ;bs2
    If $Button2 = 70 Then Exit

    [/autoit]

    Zu deinem ersten Beispiel: "GUICtrlRead($Button2)" liest du den Text auf dem Button aus. Ich glaub nicht das dich der Text weiterbringt.

    wenn $Button2 die ID 70 hat dann wird beim zweiten Beispiel immer True rauskommen also "Exit".


    so könntest du nochmal konkret sagen was du wirklich machen willst?
    ich haps bis jetzt noch nicht so richtig verstanden.

    Einmal editiert, zuletzt von Dustin (1. Mai 2007 um 08:34)

  • wenn ich den button2 drücke, soll der code wo unter den button2 kommt funktionieren.

    zb:
    das das programm sich schliesst "exit" oder das die schleife des button1 beentet wird "exitloop" oder der gleichen.

    Doktore