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
If $gui020002 = xx Then
xxxxxxxx
EndIf
Aktueller Code (stand: 01.10.2009 / 11:45)
Spoiler anzeigen
$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)
#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
; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;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]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
;BIS HIER
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_button ()
; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Func _button ()
While 1
Sleep (1000)
WEnd
EndFunc
; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Func _exit ()
Exit
EndFunc