Progressbar Frage

  • Hallo, gibt es eine Möglichkeit eine Funktion zu callen wenn die Progressbar < 40%?

  • Klar.

    [autoit]

    If GUICtrlRead($hProgress) < 40 Then _BlaBla()

    [/autoit]

    Edit: Als "kleine" Hilfestellung.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $hGui = GUICreate("Gui", 200, 200)
    $hProgress = GUICtrlCreateProgress(10, 10, 180, 20)
    $hSlider = GUICtrlCreateSlider(10, 50, 100)
    $hLabel = GUICtrlCreateLabel("Unter 40%", 10, 90, 180, 20)
    GUICtrlSetLimit(-1, 100)
    GUISetState()

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $hSlider
    GUICtrlSetData($hProgress, GUICtrlRead($hSlider))
    If GUICtrlRead($hProgress) < 40 Then
    _BlaBla()
    Else
    GUICtrlSetData($hLabel, "Über 40%")
    EndIf
    EndSwitch
    WEnd

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

    Func _BlaBla()
    GUICtrlSetData($hLabel, "Unter 40%")
    EndFunc

    [/autoit]

    2 Mal editiert, zuletzt von m-obi (17. April 2010 um 23:24)