GUI Progress

  • Hallo @lesers ^^

    hab ein problem
    Wie kann ich es machen das wann er das func durchmacht alles 25% hat und so wie bei einer installation eines spiels weiter geht also alles hat 25% und alle 4 Func 100% und bei den func selbst zb ist in der 1func 10 dateien drin hat eine datei 2,5% sind in der 2 func 100 dateien hat eine datei 0,25% die 3te func hat 1 datei also hat diese 25% (das war nur ein beispiel) ich möchte das er sich selbst ausrechnet wieviel das immer in % hat weil wann ich eine datei hinzufüge muss ich nicht selbst alles wieder anpassen.


    Im Script Zeile 212 bis 262.

    Im anderen passt alles (für mich mal).


    Bitte um schnelle hilfe


    PS: möchte nicht das verwenden:

    Spoiler anzeigen
    [autoit]


    If $gui020002 = xx Then
    xxxxxxxx
    EndIf

    [/autoit]

    Aktueller Code (stand: 01.10.2009 / 11:45)

    Spoiler anzeigen
    [autoit][/autoit] [autoit][/autoit] [autoit]

    $programmpasswort0001 = ""
    $programmpasswort0002 = ""
    $programmpasswort0003 = ""
    $programmpasswort0004 = ""
    $programmpasswort0005 = ""
    $programmname0001 = "Programmname"
    $programmversion0001 = "0.0.0.1"
    $programmprogrammierer0001 = "S.C."
    $gui010001x = 420
    $gui010001y = 185
    $gui020001x = 510
    $gui020001y = 30
    $gui030001x = 0
    $gui030001y = 0
    $gui040001x = 0
    $gui040001y = 0
    $gui050001x = 0
    $gui050001y = 0
    $gui060001x = 0
    $gui060001y = 0
    $gui070001x = 0
    $gui070001y = 0
    $gui080001x = 0
    $gui080001y = 0
    $gui090001x = 0
    $gui090001y = 0
    $gui100001x = 0
    $gui100001y = 0
    $zeit0001 = FileGetTime (@ScriptFullPath, 1, 0) ;Erstellt
    $zeit0002 = FileGetTime (@ScriptFullPath, 0, 0) ;Verändert
    $zeit0003 = FileGetTime (@ScriptFullPath, 2, 0) ;Letzter Zugriff
    $random0001 = Random (0, 0)
    $random0002 = Random (0, 0)
    $random0003 = Random (0, 0)
    $random0004 = Random (0, 0)
    $random0005 = Random (0, 0)

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

    #include <ComboConstants.au3>
    #include <Date.au3>
    #include <DateTimeConstants.au3>
    #include <EditConstants.au3>
    #Include <GuiButton.au3>
    #include <GuiConstantsEx.au3>
    #Include <GuiListView.au3>
    #include <GuiMenu.au3>
    #include <GuiStatusBar.au3>
    #Include <GuiTreeView.au3>
    #include <INet.au3>
    #include <ProgressConstants.au3>
    #include <SendMessage.au3>
    #include <StaticConstants.au3>
    #Include <Timers.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    Opt ("CaretCoordMode", 1)
    Opt ("ExpandEnvStrings", 0)
    Opt ("ExpandVarStrings", 0)
    Opt ("FtpBinaryMode", 1)
    Opt ("GUICloseOnESC", 1)
    Opt ("GUICoordMode", 1)
    Opt ("GUIDataSeparatorChar","|")
    Opt ("GUIOnEventMode", 0)
    Opt ("GUIResizeMode", 0)
    Opt ("GUIEventOptions",0)
    Opt ("MouseClickDelay", 10)
    Opt ("MouseClickDownDelay", 10)
    Opt ("MouseClickDragDelay", 250)
    Opt ("MouseCoordMode", 1)
    Opt ("MustDeclareVars", 0)
    Opt ("OnExitFunc","OnAutoItExit")
    Opt ("PixelCoordMode", 1)
    Opt ("SendAttachMode", 0)
    Opt ("SendCapslockMode", 1)
    Opt ("SendKeyDelay", 5)
    Opt ("SendKeyDownDelay", 5)
    Opt ("TCPTimeout", 100)
    Opt ("TrayAutoPause", 1)
    Opt ("TrayIconDebug", 0)
    Opt ("TrayIconHide", 0)
    Opt ("TrayMenuMode", 0)
    Opt ("TrayOnEventMode", 0)
    Opt ("WinDetectHiddenText", 0)
    Opt ("WinSearchChildren", 1)
    Opt ("WinTextMatchMode", 1)
    Opt ("WinTitleMatchMode", 1)
    Opt ("WinWaitDelay", 250)
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    $gui010001 = GUICreate ("Sicherheitsabfrage:", $gui010001x, $gui010001y, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST)
    GUISetBkColor (0x000000)
    GUISetCursor (3, 1)
    GUICtrlCreateLabel ("Passwort 1:", 5, 5, 60, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    GUICtrlCreateLabel ("Passwort 2:", 5, 30, 60, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    GUICtrlCreateLabel ("Passwort 3:", 5, 55, 60, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    GUICtrlCreateLabel ("Passwort 4:", 5, 80, 60, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    GUICtrlCreateLabel ("Passwort 5:", 5, 105, 60, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    $gui010002 = GUICtrlCreateInput("", 70, 5, 240, 20, $ES_PASSWORD)
    $gui010007 = GUICtrlCreateButton("Weiter", 315, 5, 100, 20)
    $gui010012 = GUICtrlCreateButton("Exit", 5, 135, 410, 20)
    GUISetState (@SW_SHOW, $gui010001)
    $gui010013 = GUICtrlCreateLabel (" ", 5, 160, 205, 20)
    GUICtrlSetColor (-1, 0xFFFFFF)
    While True
    $gui010014 = GUIGetMsg()
    Switch $gui010014
    Case $gui010007
    If GUICTRLREAD ($gui010002) = $programmpasswort0001 Then
    GUICtrlDelete ($gui010002)
    GUICtrlDelete ($gui010007)
    GUICtrlSetData ($gui010013, "Passwort 1 Richtig.")
    $gui010003 = GUICtrlCreateInput("", 70, 30, 240, 20, $ES_PASSWORD)
    $gui010008 = GUICtrlCreateButton("Weiter", 315, 30, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete ($gui010002)
    GUICtrlDelete ($gui010007)
    GUICtrlSetData ($gui010013, "Passwort 1 Falsch.")
    Endif
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010015 = GUIGetMsg()
    Switch $gui010015
    Case $gui010008
    If GUICTRLREAD ($gui010003) = $programmpasswort0002 Then
    GUICtrlDelete ($gui010003)
    GUICtrlDelete ($gui010008)
    GUICtrlSetData ($gui010013, "Passwort 2 Richtig.")
    $gui010004 = GUICtrlCreateInput("", 70, 55, 240, 20, $ES_PASSWORD)
    $gui010009 = GUICtrlCreateButton("Weiter", 315, 55, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete ($gui010003)
    GUICtrlDelete ($gui010008)
    GUICtrlSetData ($gui010013, "Passwort 2 Falsch.")
    Endif
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010016 = GUIGetMsg()
    Switch $gui010016
    Case $gui010008
    If GUICTRLREAD ($gui010004) = $programmpasswort0003 Then
    GUICtrlDelete ($gui010003)
    GUICtrlDelete ($gui010008)
    GUICtrlSetData ($gui010013, "Passwort 3 Richtig.")
    $gui010005 = GUICtrlCreateInput("", 70, 80, 240, 20, $ES_PASSWORD)
    $gui010009 = GUICtrlCreateButton("Weiter", 315, 80, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete ($gui010004)
    GUICtrlDelete ($gui010008)
    GUICtrlSetData ($gui010013, "Passwort 3 Falsch.")
    Endif
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010017 = GUIGetMsg()
    Switch $gui010017
    Case $gui010009
    If GUICTRLREAD ($gui010005) = $programmpasswort0004 Then
    GUICtrlDelete ($gui010005)
    GUICtrlDelete ($gui010009)
    GUICtrlSetData ($gui010013, "Passwort 4 Richtig.")
    $gui010006 = GUICtrlCreateInput("", 70, 105, 240, 20, $ES_PASSWORD)
    $gui010010 = GUICtrlCreateButton("Weiter", 315, 105, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete ($gui010005)
    GUICtrlDelete ($gui010009)
    GUICtrlSetData ($gui010013, "Passwort 4 Falsch.")
    Endif
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010018 = GUIGetMsg()
    Switch $gui010018
    Case $gui010010
    If GUICTRLREAD ($gui010006) = $programmpasswort0005 Then
    GUICtrlDelete ($gui010006)
    GUICtrlDelete ($gui010010)
    GUICtrlDelete ($gui010012)
    GUICtrlSetData ($gui010013, "Passwort 5 Richtig.")
    Sleep (1500)
    GUIDelete ($gui010001)
    ExitLoop
    Else
    GUICtrlDelete ($gui010005)
    GUICtrlDelete ($gui010009)
    GUICtrlSetData ($gui010013, "Passwort 5 Falsch.")
    Endif
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

    ;AB HIER IST DAS PROBLEM

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

    $gui020001 = GUICreate ("Lädt ...", $gui020001x, $gui020001y, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST)
    $gui020002 = GUICtrlCreateProgress (5, 5, 500, 20, $PBS_SMOOTH)
    GUISetBkColor (0x000000)
    GUISetCursor (16, 1)
    GUISetState (@SW_SHOW, $gui020001)
    _install ()
    Sleep (500)
    _hotkeyset ()
    Sleep (500)
    _menu ()
    Sleep (500)
    _start ()
    Sleep (500)

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

    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

    Func _install ()
    For $gui020003 = 1 To 25
    GUICtrlSetData ($gui020002, $gui020003)
    ;DirCreate
    ;FileInstall
    ;FileCopy
    Next
    EndFunc
    Func _hotkeyset ()
    For $gui020004 = 26 To 50
    GUICtrlSetData ($gui020002, $gui020004)
    HotKeySet ("{ESC}", "_exit")
    HotKeySet ("{F5}", "_button")
    Next
    EndFunc
    Func _menu ()
    For $gui020005 = 51 To 75
    GUICtrlSetData ($gui020002, $gui020005)
    ;GUICtrlCreateMenu
    ;GUICtrlCreateMenuItem
    ;TrayCreateItem
    Next
    EndFunc
    Func _start ()
    For $gui020006 = 76 To 100
    GUICtrlSetData ($gui020002, $gui020006)
    ;FileExists
    Next
    EndFunc

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

    ;BIS HIER

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

    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    _button ()
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Func _button ()
    While 1
    Sleep (1000)
    WEnd
    EndFunc
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Func _exit ()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • ja das er beim func der ganze func hat 25% und wann er da weiter macht die 25% selbst durch die dateien bzw befehle im func teilt und pro fertiger befehl dann die ausgerechneten % im progressbar darstellt bei 10dateien wären das 2,5% pro befehl :) besser beschrieben?

  • naja ich sags mal so


    Func _start ()

    FileInstall
    HOtKeySet
    GUICreate
    GUISETSTATE
    GUICTRLCREATEPROGRESS

    EndFunc


    also der Func hat 100% er sucht wieviel befehle im Func sind hier sind es 5 also rechnet er sich aus wieviel 1 befehl % hat (100% / 5 = 20% pro befehl) und wann er dann ein befehl fertig hat rechnet er im progressbar die 20% dazu bzw stellt sie dar so war das gemeint

    er kann auch wanns so einfacher geht den ganzen func 100% geben und um so mehr erledigt ist um so voller ist dann der progressbar


    einfach wie bei einer installation um so mehr erledigt um so weiter der fortschrittsbalken

  • Naja das ist aber relativ unsinnig, schließlich können die Funktionen unterschiedlich lang dauern.

    Wie man Zeilen im Skript automatisch zählt weiss ich nicht, du kannst aber ja eine lokale Variable mit der Anzahl der Funktionen festlegen ($count = 5).
    Nach jeder Funktion veränderst du dann den Progress mit dem Kehrwert (1/5).

  • Naja das ist aber relativ unsinnig, schließlich können die Funktionen unterschiedlich lang dauern.

    Wie man Zeilen im Skript automatisch zählt weiss ich nicht, du kannst aber ja eine lokale Variable mit der Anzahl der Funktionen festlegen ($count = 5).
    Nach jeder Funktion veränderst du dann den Progress mit dem Kehrwert (1/5).


    ja ich weiß das sie untschiedlich lange dauern gibts so ein befehl auch wo selbst das dann macht so das sie auch unterschiedlich lange dauern und am ende einfach den %satz wo man angibt am ende alle befehle zusammen haben?

    falls ja könntest du mir den bitte geben oder wie der befehl lautet der wäre natürlich besser als meine idee :S

  • Hallo SchrotterCh,

    könntest du in deine(n)m Skript(en) bitte für die Variable "sprechende Namen" verwenden anstelle von z.B. $hbtnWeiter anstelle von $gui010008. Wenn jemand fremdes hineienschaut, kriegt der doch gleich einen Horror und versucht es erst gar nicht mit Hilfe des Skriptes deine Frage zu verstehen.
    Auch wäre es sehr hilfreich mit Tabs If .. Then, For ... Next Blöcke lesbarer zu machen. Geht mit Tidy: in Scite ALT|T(ools)|T(idy AutoIt Source)|Enter

    das Ergebnis (nur Tidy) sieht dann so aus:

    Spoiler anzeigen
    [autoit]

    $programmpasswort0001 = ""
    $programmpasswort0002 = ""
    $programmpasswort0003 = ""
    $programmpasswort0004 = ""
    $programmpasswort0005 = ""
    $programmname0001 = "Programmname"
    $programmversion0001 = "0.0.0.1"
    $programmprogrammierer0001 = "S.C."
    $gui010001x = 420
    $gui010001y = 185
    $gui020001x = 510
    $gui020001y = 30
    $gui030001x = 0
    $gui030001y = 0
    $gui040001x = 0
    $gui040001y = 0
    $gui050001x = 0
    $gui050001y = 0
    $gui060001x = 0
    $gui060001y = 0
    $gui070001x = 0
    $gui070001y = 0
    $gui080001x = 0
    $gui080001y = 0
    $gui090001x = 0
    $gui090001y = 0
    $gui100001x = 0
    $gui100001y = 0
    $zeit0001 = FileGetTime(@ScriptFullPath, 1, 0) ;Erstellt
    $zeit0002 = FileGetTime(@ScriptFullPath, 0, 0) ;Verändert
    $zeit0003 = FileGetTime(@ScriptFullPath, 2, 0) ;Letzter Zugriff
    $random0001 = Random(0, 0)
    $random0002 = Random(0, 0)
    $random0003 = Random(0, 0)
    $random0004 = Random(0, 0)
    $random0005 = Random(0, 0)

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

    #include <ComboConstants.au3>
    #include <Date.au3>
    #include <DateTimeConstants.au3>
    #include <EditConstants.au3>
    #include <GuiButton.au3>
    #include <GuiConstantsEx.au3>
    #include <GuiListView.au3>
    #include <GuiMenu.au3>
    #include <GuiStatusBar.au3>
    #include <GuiTreeView.au3>
    #include <INet.au3>
    #include <ProgressConstants.au3>
    #include <SendMessage.au3>
    #include <StaticConstants.au3>
    #include <Timers.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    Opt("CaretCoordMode", 1)
    Opt("ExpandEnvStrings", 0)
    Opt("ExpandVarStrings", 0)
    Opt("FtpBinaryMode", 1)
    Opt("GUICloseOnESC", 1)
    Opt("GUICoordMode", 1)
    Opt("GUIDataSeparatorChar", "|")
    Opt("GUIOnEventMode", 0)
    Opt("GUIResizeMode", 0)
    Opt("GUIEventOptions", 0)
    Opt("MouseClickDelay", 10)
    Opt("MouseClickDownDelay", 10)
    Opt("MouseClickDragDelay", 250)
    Opt("MouseCoordMode", 1)
    Opt("MustDeclareVars", 0)
    Opt("OnExitFunc", "OnAutoItExit")
    Opt("PixelCoordMode", 1)
    Opt("SendAttachMode", 0)
    Opt("SendCapslockMode", 1)
    Opt("SendKeyDelay", 5)
    Opt("SendKeyDownDelay", 5)
    Opt("TCPTimeout", 100)
    Opt("TrayAutoPause", 1)
    Opt("TrayIconDebug", 0)
    Opt("TrayIconHide", 0)
    Opt("TrayMenuMode", 0)
    Opt("TrayOnEventMode", 0)
    Opt("WinDetectHiddenText", 0)
    Opt("WinSearchChildren", 1)
    Opt("WinTextMatchMode", 1)
    Opt("WinTitleMatchMode", 1)
    Opt("WinWaitDelay", 250)
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    $gui010001 = GUICreate("Sicherheitsabfrage:", $gui010001x, $gui010001y, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000)
    GUISetCursor(3, 1)
    GUICtrlCreateLabel("Passwort 1:", 5, 5, 60, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlCreateLabel("Passwort 2:", 5, 30, 60, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlCreateLabel("Passwort 3:", 5, 55, 60, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlCreateLabel("Passwort 4:", 5, 80, 60, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlCreateLabel("Passwort 5:", 5, 105, 60, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    $gui010002 = GUICtrlCreateInput("", 70, 5, 240, 20, $ES_PASSWORD)
    $gui010007 = GUICtrlCreateButton("Weiter", 315, 5, 100, 20)
    $gui010012 = GUICtrlCreateButton("Exit", 5, 135, 410, 20)
    GUISetState(@SW_SHOW, $gui010001)
    $gui010013 = GUICtrlCreateLabel(" ", 5, 160, 205, 20)
    GUICtrlSetColor(-1, 0xFFFFFF)
    While True
    $gui010014 = GUIGetMsg()
    Switch $gui010014
    Case $gui010007
    If GUICtrlRead($gui010002) = $programmpasswort0001 Then
    GUICtrlDelete($gui010002)
    GUICtrlDelete($gui010007)
    GUICtrlSetData($gui010013, "Passwort 1 Richtig.")
    $gui010003 = GUICtrlCreateInput("", 70, 30, 240, 20, $ES_PASSWORD)
    $gui010008 = GUICtrlCreateButton("Weiter", 315, 30, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete($gui010002)
    GUICtrlDelete($gui010007)
    GUICtrlSetData($gui010013, "Passwort 1 Falsch.")
    EndIf
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010015 = GUIGetMsg()
    Switch $gui010015
    Case $gui010008
    If GUICtrlRead($gui010003) = $programmpasswort0002 Then
    GUICtrlDelete($gui010003)
    GUICtrlDelete($gui010008)
    GUICtrlSetData($gui010013, "Passwort 2 Richtig.")
    $gui010004 = GUICtrlCreateInput("", 70, 55, 240, 20, $ES_PASSWORD)
    $gui010009 = GUICtrlCreateButton("Weiter", 315, 55, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete($gui010003)
    GUICtrlDelete($gui010008)
    GUICtrlSetData($gui010013, "Passwort 2 Falsch.")
    EndIf
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010016 = GUIGetMsg()
    Switch $gui010016
    Case $gui010008
    If GUICtrlRead($gui010004) = $programmpasswort0003 Then
    GUICtrlDelete($gui010003)
    GUICtrlDelete($gui010008)
    GUICtrlSetData($gui010013, "Passwort 3 Richtig.")
    $gui010005 = GUICtrlCreateInput("", 70, 80, 240, 20, $ES_PASSWORD)
    $gui010009 = GUICtrlCreateButton("Weiter", 315, 80, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete($gui010004)
    GUICtrlDelete($gui010008)
    GUICtrlSetData($gui010013, "Passwort 3 Falsch.")
    EndIf
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010017 = GUIGetMsg()
    Switch $gui010017
    Case $gui010009
    If GUICtrlRead($gui010005) = $programmpasswort0004 Then
    GUICtrlDelete($gui010005)
    GUICtrlDelete($gui010009)
    GUICtrlSetData($gui010013, "Passwort 4 Richtig.")
    $gui010006 = GUICtrlCreateInput("", 70, 105, 240, 20, $ES_PASSWORD)
    $gui010010 = GUICtrlCreateButton("Weiter", 315, 105, 100, 20)
    ExitLoop
    Else
    GUICtrlDelete($gui010005)
    GUICtrlDelete($gui010009)
    GUICtrlSetData($gui010013, "Passwort 4 Falsch.")
    EndIf
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    While True
    $gui010018 = GUIGetMsg()
    Switch $gui010018
    Case $gui010010
    If GUICtrlRead($gui010006) = $programmpasswort0005 Then
    GUICtrlDelete($gui010006)
    GUICtrlDelete($gui010010)
    GUICtrlDelete($gui010012)
    GUICtrlSetData($gui010013, "Passwort 5 Richtig.")
    Sleep(1500)
    GUIDelete($gui010001)
    ExitLoop
    Else
    GUICtrlDelete($gui010005)
    GUICtrlDelete($gui010009)
    GUICtrlSetData($gui010013, "Passwort 5 Falsch.")
    EndIf
    Case $gui010012
    Exit
    EndSwitch
    WEnd
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

    ;AB HIER IST DAS PROBLEM

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

    $gui020001 = GUICreate("Lädt ...", $gui020001x, $gui020001y, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST)
    $gui020002 = GUICtrlCreateProgress(5, 5, 500, 20, $PBS_SMOOTH)
    GUISetBkColor(0x000000)
    GUISetCursor(16, 1)
    GUISetState(@SW_SHOW, $gui020001)
    _install()
    Sleep(500)
    _hotkeyset()
    Sleep(500)
    _menu()
    Sleep(500)
    _start()
    Sleep(500)

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

    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

    Func _install()
    For $gui020003 = 1 To 25
    GUICtrlSetData($gui020002, $gui020003)
    ;DirCreate
    ;FileInstall
    ;FileCopy
    Next
    EndFunc ;==>_install
    Func _hotkeyset()
    For $gui020004 = 26 To 50
    GUICtrlSetData($gui020002, $gui020004)
    HotKeySet("{ESC}", "_exit")
    HotKeySet("{F5}", "_button")
    Next
    EndFunc ;==>_hotkeyset
    Func _menu()
    For $gui020005 = 51 To 75
    GUICtrlSetData($gui020002, $gui020005)
    ;GUICtrlCreateMenu
    ;GUICtrlCreateMenuItem
    ;TrayCreateItem
    Next
    EndFunc ;==>_menu
    Func _start()
    For $gui020006 = 76 To 100
    GUICtrlSetData($gui020002, $gui020006)
    ;FileExists
    Next
    EndFunc ;==>_start

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

    ;BIS HIER

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

    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    _button()
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Func _button()
    While 1
    Sleep(1000)
    WEnd
    EndFunc ;==>_button
    ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Func _Exit()
    Exit
    EndFunc ;==>_exit

    [/autoit]


    mfg (Auto)Bert

  • Schmeiß deine Sleep(500) raus - sind eh unsinnig - und füge dort einfach

    [autoit]

    GuiCtrlSetData($progress, 25) ; bzw. 50, 75, 100

    [/autoit]

    ein.

    und damit hat alles 25% und er macht alles immer wann er es fertig hat oder am ende dann 25% mehr dazu?

    da ändert er doch dann einfach am ende allesauf 25% oder gibt es nicht ne möglich keit das er wie bei einer installation immer mit geht um so mehr er hat und nicht immer so springt?

  • ok mach ich merk es mir für das nexte mal

    • Offizieller Beitrag

    und damit hat alles 25% und er macht alles immer wann er es fertig hat oder am ende dann 25% mehr dazu?

    da ändert er doch dann einfach am ende allesauf 25% oder gibt es nicht ne möglich keit das er wie bei einer installation immer mit geht um so mehr er hat und nicht immer so springt?

    JEDES Sleep erstezen! Einmal setzt du 25, nach dem zweiten 50,...nach dem vierten und letzten 100.
    Pure Mathematik ;)

  • Lese Wirr warr..
    Es ist DIE Func.
    (Die Funktion - The Function)
    "der func beim func"
    Auch so unsinnig ^^

    Aber ich würde an das Ende der Funktionen folgenden Code setzten:

    [autoit]


    GUICtrlSetData ($Progress, "25") ; 1.Funktion
    GUICtrlSetData ($Progress, "50") ; 2.Funktion
    GUICtrlSetData ($Progress, "75") ; 3.Funktion
    GUICtrlSetData ($Progress, "100") ;4. Funktion

    [/autoit]