RunWait .....
oder
ShellExecuteWait
Das sind die Befehle der Stunde
Beiträge von Schnuffel
-
-
Hallo Deepred92,
ich habe einen Bug in der portablen 3.3.0.1:
wenn ich nach dem Start die Lautstärke über das Menü im Systray verändern will kommt die Fehlermeldung:
Line 17599: Error: Unknown macro -
theoretisch geht das, aber dann wird der ganze Ablauf langsamer...
Ich kenne nur die Möglichkeit, den Kopiervorgang extern in einer Dos-Box audführen zu lassen.
Dann kann man anhand der Grösse der Datei eine "Hochrechnung" machen wie lange das dauert und dann im Sekundentakt den Progress aktualisieren.
Leider kostet das erstellen einer DosBox bei vielen Dateien viel Zeit.
Dadurch wird das Script bei vielen kleinen Dateien um den Faktor 10 langsamer...
Ich möchte aber Bitten, dass Du Dich mal etwas mit der Materie selbst befasst.Ich hab ja gern einen Ansatz erstellt, aber das ganze Script erstellen will ich nicht
so, hier mal mein vorerst letzter Ansatz ...
Spoiler anzeigen
[autoit]#include<Array.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>
HotKeySet("!b", "_StopCopy")Global $GuiWidth = 500, $GuiHeight = 220, $aBpS, $byteCount = 0, $timer, $temp, $i, $MyStop, $aktSourceFolder
[/autoit] [autoit][/autoit] [autoit]
$mainGui = GUICreate('Copy-Tool', $GuiWidth, $GuiHeight)$lStop = GUICtrlCreateLabel('', 10, 10, $GuiWidth-20, 20)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12,600)
GUICtrlCreateLabel('Datei wird kopiert: ', 10, $GuiHeight -180, 100, 20)
$Aktuell = GUICtrlCreateLabel('', 10, $GuiHeight -160, $GuiWidth -20, 18)
$subProgress = GUICtrlCreateProgress(10, $GuiHeight-130, $GuiWidth-20, 20)
GUICtrlCreateLabel('Fortschritt:', 10, $GuiHeight-100, 50, 20)
$Anzahl = GUICtrlCreateLabel('0/0', 70, $GuiHeight -100, 80, 20)
GUICtrlCreateLabel('Geschwindigkeit: ', 220, $GuiHeight-100, 80, 20)
$Speed = GUICtrlCreateLabel('0 MB/s', 310, $GuiHeight -100, 80, 20)
$mainProgress = GUICtrlCreateProgress(10, $GuiHeight-80, $GuiWidth-20, 20)
$bStart = GUICtrlCreateButton('Kopiervorgang starten', 10 , $GuiHeight-50, $GuiWidth-20, 40)
GUICtrlSetState($bStart, $GUI_DISABLE)
GUISetState()
ConsoleWrite(IniReadSection('backup.ini', 'BackupVerzeichnisse') & @CRLF)$aCopyFiles = _FileRead(IniReadSection('backup.ini', 'BackupVerzeichnisse'))
[/autoit] [autoit][/autoit] [autoit]GUICtrlSetData($Anzahl, '0 / ' & $aCopyFiles[0][0])
[/autoit] [autoit][/autoit] [autoit]
$aCopyPfad = IniRead('backup.ini', 'Zielpfad', '1', '')GUICtrlSetState($bStart, $GUI_ENABLE)
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $bStart
GUICtrlSetData($lStop, 'Kopiervorgang läuft ...')
GUICtrlSetData($bStart, 'Kopiervorgang läuft! -- beenden = Alt-b')
$timer = TimerInit()
For $i = 1 To $aCopyFiles[0][0]
If $MyStop Then
$MyStop = 0
GUICtrlSetData($lStop, 'Kopiervorgang abgebrochen')
ExitLoop
EndIf
GUICtrlSetData($Anzahl, $i & ' / ' & $aCopyFiles[0][0])
GUICtrlSetData($Aktuell, $aCopyFiles[$i][0])
If $aCopyFiles[$i][1] = 0 Then
$aktSourceFolder = $aCopyFiles[$i][0]
$aktDestFolder = $aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2)
DirCreate($aktDestFolder)
Else
;_FileCopy()
_FileCopyDOS()
EndIf
GUICtrlSetData($mainProgress, 100/$aCopyFiles[0][1]*$byteCount)
Next
GUICtrlSetData($bStart, 'Kopiervorgang neu starten')
GUICtrlSetState($bStart, $GUI_ENABLE)
EndSelect
WEndFunc _StopCopy()
[/autoit] [autoit][/autoit] [autoit]
$MyStop = 1
GUICtrlSetData($lStop, 'Kopiervorgang wird abgebrochen ...')
EndFuncFunc _FileCopy()
[/autoit] [autoit][/autoit] [autoit]
If FileExists($aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2)) = 0 Or FileGetSize($aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2)) <> $aCopyFiles[$i][1] Then
FileCopy($aCopyFiles[$i][0], $aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2),9)
$byteCount += $aCopyFiles[$i][1]
$aBpS = Round($byteCount/(Round(TimerDiff($timer)/1000,0))/1048576,2)
If $aBpS > 0 Then GUICtrlSetData($Speed, $aBpS & ' MB/s')
EndIf
EndFuncFunc _FileCopyDOS()
[/autoit] [autoit][/autoit] [autoit]
$aktDestFolder = $aCopyPfad & StringTrimLeft($aktSourceFolder,2)
$ProcID = Run(@ComSpec & ' /c xcopy /D /H /Y /J "' & $aCopyFiles[$i][0] & '" "' & $aktDestFolder & '"', "", @SW_HIDE)
$origfilesize = DirGetSize($aktSourceFolder)
Do
$copyfilesize = DirGetSize($aktDestFolder)
$percent = Round($origfilesize/$copyfilesize*100)
GUICtrlSetData($subprogress, $percent)
Until ProcessExists($ProcID) = 0
$byteCount += $aCopyFiles[$i][1]
$aBpS = Round($byteCount/(Round(TimerDiff($timer)/1000,0))/1048576,2)
If $aBpS > 0 Then GUICtrlSetData($Speed, $aBpS & ' MB/s')
GUICtrlSetData($subprogress, 0)
EndFuncFunc _FileRead($aMyFolders)
[/autoit] [autoit][/autoit] [autoit]
Local $aTempFiles[1], $aFiles[1][2], $aTemp, $k
For $i = 1 To $aMyFolders[0][0]
$aTemp = _FileListToArrayXT($aMyFolders[$i][1], Default, 0 , 2, True, 0)
$aTemp[0] = $aMyFolders[$i][1]
_ArrayConcatenate($aTempFiles, $aTemp)
$aTempFiles[0] += UBound($aTemp)
Next
ReDim $aFiles[$aTempFiles[0]+1][2]
For $i = 0 To $aTempFiles[0]
$aFiles[$i][0] = $aTempFiles[$i]
$k = FileGetSize($aTempFiles[$i])
$aFiles[$i][1] = $k
$aFiles[0][1] += $k
Next
Return $aFiles
EndFunc; #FUNCTION# ===========================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name: _FileListToArrayXT
; Description: Lists files and\or folders in specified path(s) (Similar to using Dir with the /B Switch)
; additional features: multi-path, multi-filter, multi-exclude-filter, path format options, recursive search
; Syntax: _FileListToArrayXT([$sPath = @ScriptDir, [$sFilter = "*", [$iRetItemType, [$bRecursive = False, [$sExclude = "", [$iRetFormat = 1]]]]]])
; Parameter(s): $sPath = optional: Search path(s), semicolon delimited (default: @ScriptDir)
; (Example: "C:\Tmp;D:\Temp")
; $sFilter = optional: Search filter(s), semicolon delimited . Wildcards allowed. (default: "*")
; (Example: "*.exe;*.txt")
; $iRetItemType = Include in search: 0 = Files and Folder, 1 = Files Only, 2 = Folders Only
; $iRetPathType = Returned element format: 0 = file/folder name only, 1 = relative path, 2 = full path
; $bRecursive = optional: True: recursive search including all subdirectories
; False (default): search only in specified folder
; $sExclude = optional: Exclude filter(s), semicolon delimited. Wildcards allowed.
; (Example: "Unins*" will remove all files/folders that begin with "Unins")
; $iRetFormat = optional: return format
; 0 = one-dimensional array, 0-based
; 1 = one-dimensional array, 1-based (default)
; 2 = String ( "|" delimited)
; Requirement(s): AutoIt Version 3.3.1.1 or newer
; Return Value(s): on success: 1-based or 0-based array or string (dependent on $iRetFormat)
; If no path is found, @error and @extended are set to 1, returns empty string
; If no filter is found, @error and @extended are set to 2, returns empty string
; If $iRetFormat is invalid, @error and @extended are set to 3, returns empty string
; If no data is found, @error and @extended are set to 4, returns empty string
; Author(s): Half the AutoIt Community
; ====================================================================================================
Func _FileListToArrayXT($sPath = @ScriptDir, $sFilter = "*", $iRetItemType = 0, $iRetPathType = 0, $bRecursive = False, $sExclude = "", $iRetFormat = 1)
Local $hSearchFile, $sFile, $sFileList, $sWorkPath, $sRetPath, $iRootPathLen, $iPCount, $iFCount, $fDirFlag;[check and prepare parameters]
[/autoit] [autoit][/autoit] [autoit]
;---------------
If $sPath = -1 Or $sPath = Default Then $sPath = @ScriptDir
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sPath = StringRegExpReplace(StringRegExpReplace($sPath, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check that at least one path is set
If $sPath = "" Then Return SetError(1, 1, "")
;-----
If $sFilter = -1 Or $sFilter = Default Then $sFilter = "*"
;prepare filter
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sFilter = StringRegExpReplace(StringRegExpReplace($sFilter, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check for invalid chars or that at least one filter is set
If StringRegExp($sFilter, "[\\/><:\|]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
If $bRecursive Then
;Convert $sFilter for Regular Expression
$sFilter = StringRegExpReplace($sFilter, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sFilter = StringReplace($sFilter, "?", ".")
$sFilter = StringReplace($sFilter, "*", ".*?")
$sFilter = "(?i)\A(" & StringReplace($sFilter, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sFilter = "(?i)\A" & StringReplace($sFilter, ";", "|") & "\z"
EndIf
;-----
If $iRetItemType <> "1" And $iRetItemType <> "2" Then $iRetItemType = "0"
;-----
If $iRetPathType <> "1" And $iRetPathType <> "2" Then $iRetPathType = "0"
;-----
$bRecursive = ($bRecursive = "1")
;-----
If $sExclude = -1 Or $sExclude = Default Then $sExclude = ""
If $sExclude Then
;prepare $sExclude
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sExclude = StringRegExpReplace(StringRegExpReplace($sExclude, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;Convert $sExclude for Regular Expression
$sExclude = StringRegExpReplace($sExclude, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sExclude = StringReplace($sExclude, "?", ".")
$sExclude = StringReplace($sExclude, "*", ".*?")
$sExclude = "(?i)\A(" & StringReplace($sExclude, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sExclude = "(?i)\A" & StringReplace($sExclude, ";", "|") & "\z"
EndIf
;-----
;If $iRetFormat <> "0" And $iRetFormat <> "2" Then $iRetFormat = "1"
If Not ($iRetItemType = 0 Or $iRetItemType = 1 Or $iRetItemType = 2) Then Return SetError(3, 3, "")
;---------------
;[/check and prepare parameters];---------------
[/autoit] [autoit][/autoit] [autoit]Local $aPath = StringSplit($sPath, ';', 1) ;paths array
[/autoit] [autoit][/autoit] [autoit]
Local $aFilter = StringSplit($sFilter, ';', 1) ;filters array;---------------
[/autoit] [autoit][/autoit] [autoit]If $bRecursive Then ;different handling for recursion (strategy: unfiltered search for all items and filter unwanted)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $bRecursive (strategy: filtered search for items)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
;check for exclude files
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
;check for exclude folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
;check for exclude files/folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $bRecursive
[/autoit] [autoit][/autoit] [autoit];---------------
[/autoit] [autoit][/autoit] [autoit];set according return value
[/autoit] [autoit][/autoit] [autoit]
If $sFileList Then
Switch $iRetFormat
Case 2 ;return a delimited string
Return StringTrimRight($sFileList, 1)
Case 0 ;return a 0-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 2)
Case Else ;return a 1-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 1)
EndSwitch
Else
Return SetError(4, 4, "")
EndIfEndFunc ;==>_FileListToArrayXT
[/autoit] -
mach mal in der ini die Leerzeichen vor und nach dem Gleichheitszeichen weg.
Es wird nicht überprüft, ob die Verzwichnisse existieren ... -
so,
weil ich gerade Lust dazu hatte...Spoiler anzeigen
[autoit]#include<Array.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>
HotKeySet("!b", "_StopCopy")Global $GuiWidth = 500, $GuiHeight = 180, $aBpS, $byteCount = 0, $timer, $temp, $i, $MyStop
[/autoit] [autoit][/autoit] [autoit]
$mainGui = GUICreate('Copy-Tool', $GuiWidth, $GuiHeight)$lStop = GUICtrlCreateLabel('', 10, 10, $GuiWidth-20, 20)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12,600)
GUICtrlCreateLabel('Datei wird kopiert: ', 10, $GuiHeight -140, 100, 20)
$Aktuell = GUICtrlCreateLabel('', 10, $GuiHeight -120, $GuiWidth -20, 18)
GUICtrlCreateLabel('Fortschritt:', 10, $GuiHeight-100, 50, 20)
$Anzahl = GUICtrlCreateLabel('0/0', 70, $GuiHeight -100, 80, 20)
GUICtrlCreateLabel('Geschwindigkeit: ', 220, $GuiHeight-100, 80, 20)
$Speed = GUICtrlCreateLabel('0 MB/s', 310, $GuiHeight -100, 80, 20)
$mainProgress = GUICtrlCreateProgress(10, $GuiHeight-80, $GuiWidth-20, 20)
$bStart = GUICtrlCreateButton('Kopiervorgang starten', 10 , $GuiHeight-50, $GuiWidth-20, 40)
GUICtrlSetState($bStart, $GUI_DISABLE)
GUISetState()$aCopyFiles = _FileRead(IniReadSection('backup.ini', 'BackupVerzeichnisse'))
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($Anzahl, '0 / ' & $aCopyFiles[0][0])
$aCopyPfad = IniRead('test.ini', 'Zielpfad', '1', '')GUICtrlSetState($bStart, $GUI_ENABLE)
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $bStart
GUICtrlSetData($lStop, 'Kopiervorgang läuft ...')
GUICtrlSetData($bStart, 'Kopiervorgang läuft! -- beenden = Alt-b')
$timer = TimerInit()
For $i = 1 To $aCopyFiles[0][0]
If $MyStop Then
$MyStop = 0
GUICtrlSetData($lStop, 'Kopiervorgang abgebrochen')
ExitLoop
EndIf
GUICtrlSetData($Anzahl, $i & ' / ' & $aCopyFiles[0][0])
GUICtrlSetData($Aktuell, $aCopyFiles[$i][0])
If $aCopyFiles[$i][1] = 0 Then
DirCreate($aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2))
Else
_FileCopy()
EndIf
GUICtrlSetData($mainProgress, 100/$aCopyFiles[0][1]*$byteCount)
Next
GUICtrlSetData($bStart, 'Kopiervorgang neu starten')
GUICtrlSetState($bStart, $GUI_ENABLE)
EndSelect
WEndFunc _StopCopy()
[/autoit] [autoit][/autoit] [autoit]
$MyStop = 1
GUICtrlSetData($lStop, 'Kopiervorgang wird abgebrochen ...')
EndFuncFunc _FileCopy()
[/autoit] [autoit][/autoit] [autoit]
FileCopy($aCopyFiles[$i][0], $aCopyPfad & StringTrimLeft($aCopyFiles[$i][0],2),9)
$byteCount += $aCopyFiles[$i][1]
$aBpS = Round($byteCount/(Round(TimerDiff($timer)/1000,0))/1048576,2)
If $aBpS > 0 Then GUICtrlSetData($Speed, $aBpS & ' MB/s')
EndFuncFunc _FileRead($aMyFolders)
[/autoit] [autoit][/autoit] [autoit]
Local $aTempFiles[1], $aFiles[1][2], $aTemp, $k
For $i = 1 To $aMyFolders[0][0]
$aTemp = _FileListToArrayXT($aMyFolders[$i][1], Default, 0 , 2, True, 0)
$aTemp[0] = $aMyFolders[$i][1]
_ArrayConcatenate($aTempFiles, $aTemp)
$aTempFiles[0] += UBound($aTemp)
Next
ReDim $aFiles[$aTempFiles[0]+1][2]
For $i = 0 To $aTempFiles[0]
$aFiles[$i][0] = $aTempFiles[$i]
$k = FileGetSize($aTempFiles[$i])
$aFiles[$i][1] = $k
$aFiles[0][1] += $k
Next
Return $aFiles
EndFunc; #FUNCTION# ===========================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name: _FileListToArrayXT
; Description: Lists files and\or folders in specified path(s) (Similar to using Dir with the /B Switch)
; additional features: multi-path, multi-filter, multi-exclude-filter, path format options, recursive search
; Syntax: _FileListToArrayXT([$sPath = @ScriptDir, [$sFilter = "*", [$iRetItemType, [$bRecursive = False, [$sExclude = "", [$iRetFormat = 1]]]]]])
; Parameter(s): $sPath = optional: Search path(s), semicolon delimited (default: @ScriptDir)
; (Example: "C:\Tmp;D:\Temp")
; $sFilter = optional: Search filter(s), semicolon delimited . Wildcards allowed. (default: "*")
; (Example: "*.exe;*.txt")
; $iRetItemType = Include in search: 0 = Files and Folder, 1 = Files Only, 2 = Folders Only
; $iRetPathType = Returned element format: 0 = file/folder name only, 1 = relative path, 2 = full path
; $bRecursive = optional: True: recursive search including all subdirectories
; False (default): search only in specified folder
; $sExclude = optional: Exclude filter(s), semicolon delimited. Wildcards allowed.
; (Example: "Unins*" will remove all files/folders that begin with "Unins")
; $iRetFormat = optional: return format
; 0 = one-dimensional array, 0-based
; 1 = one-dimensional array, 1-based (default)
; 2 = String ( "|" delimited)
; Requirement(s): AutoIt Version 3.3.1.1 or newer
; Return Value(s): on success: 1-based or 0-based array or string (dependent on $iRetFormat)
; If no path is found, @error and @extended are set to 1, returns empty string
; If no filter is found, @error and @extended are set to 2, returns empty string
; If $iRetFormat is invalid, @error and @extended are set to 3, returns empty string
; If no data is found, @error and @extended are set to 4, returns empty string
; Author(s): Half the AutoIt Community
; ====================================================================================================
Func _FileListToArrayXT($sPath = @ScriptDir, $sFilter = "*", $iRetItemType = 0, $iRetPathType = 0, $bRecursive = False, $sExclude = "", $iRetFormat = 1)
Local $hSearchFile, $sFile, $sFileList, $sWorkPath, $sRetPath, $iRootPathLen, $iPCount, $iFCount, $fDirFlag;[check and prepare parameters]
[/autoit] [autoit][/autoit] [autoit]
;---------------
If $sPath = -1 Or $sPath = Default Then $sPath = @ScriptDir
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sPath = StringRegExpReplace(StringRegExpReplace($sPath, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check that at least one path is set
If $sPath = "" Then Return SetError(1, 1, "")
;-----
If $sFilter = -1 Or $sFilter = Default Then $sFilter = "*"
;prepare filter
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sFilter = StringRegExpReplace(StringRegExpReplace($sFilter, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check for invalid chars or that at least one filter is set
If StringRegExp($sFilter, "[\\/><:\|]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
If $bRecursive Then
;Convert $sFilter for Regular Expression
$sFilter = StringRegExpReplace($sFilter, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sFilter = StringReplace($sFilter, "?", ".")
$sFilter = StringReplace($sFilter, "*", ".*?")
$sFilter = "(?i)\A(" & StringReplace($sFilter, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sFilter = "(?i)\A" & StringReplace($sFilter, ";", "|") & "\z"
EndIf
;-----
If $iRetItemType <> "1" And $iRetItemType <> "2" Then $iRetItemType = "0"
;-----
If $iRetPathType <> "1" And $iRetPathType <> "2" Then $iRetPathType = "0"
;-----
$bRecursive = ($bRecursive = "1")
;-----
If $sExclude = -1 Or $sExclude = Default Then $sExclude = ""
If $sExclude Then
;prepare $sExclude
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sExclude = StringRegExpReplace(StringRegExpReplace($sExclude, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;Convert $sExclude for Regular Expression
$sExclude = StringRegExpReplace($sExclude, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sExclude = StringReplace($sExclude, "?", ".")
$sExclude = StringReplace($sExclude, "*", ".*?")
$sExclude = "(?i)\A(" & StringReplace($sExclude, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sExclude = "(?i)\A" & StringReplace($sExclude, ";", "|") & "\z"
EndIf
;-----
;If $iRetFormat <> "0" And $iRetFormat <> "2" Then $iRetFormat = "1"
If Not ($iRetItemType = 0 Or $iRetItemType = 1 Or $iRetItemType = 2) Then Return SetError(3, 3, "")
;---------------
;[/check and prepare parameters];---------------
[/autoit] [autoit][/autoit] [autoit]Local $aPath = StringSplit($sPath, ';', 1) ;paths array
[/autoit] [autoit][/autoit] [autoit]
Local $aFilter = StringSplit($sFilter, ';', 1) ;filters array;---------------
[/autoit] [autoit][/autoit] [autoit]If $bRecursive Then ;different handling for recursion (strategy: unfiltered search for all items and filter unwanted)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $bRecursive (strategy: filtered search for items)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
;check for exclude files
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
;check for exclude folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
;check for exclude files/folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $bRecursive
[/autoit] [autoit][/autoit] [autoit];---------------
[/autoit] [autoit][/autoit] [autoit];set according return value
[/autoit] [autoit][/autoit] [autoit]
If $sFileList Then
Switch $iRetFormat
Case 2 ;return a delimited string
Return StringTrimRight($sFileList, 1)
Case 0 ;return a 0-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 2)
Case Else ;return a 1-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 1)
EndSwitch
Else
Return SetError(4, 4, "")
EndIfEndFunc ;==>_FileListToArrayXT
[/autoit]Ach ja, die Ini-Datei habe ich um einen Backup-Pfad erweitert...
Inidatei
[autoit][BackupVerzeichnisse]
[/autoit] [autoit][/autoit] [autoit]
;FileZilla
1 = C:\Users\Anna\Anwendungsdaten\FileZilla
; Trillian
2 = C:\Program Files (x86)\Trillian
; Webentwicklung
3 = E:\Webentwicklung
; Spiele
4 = E:\Spiele
; Fonts
5 = C:\Windows\Fonts
; Windows Sidebar
6 = C:\Users\Anna\AppData\Local\Microsoft\Windows Sidebar
; FF-Hauptverzeichniss
7 = C:\Program Files (x86)\Mozilla Firefox
; FF-Anwendungsdaten
8 = C:\Users\Anna\Anwendungsdaten\Mozilla
; TB-Hauptverzeichniss
9 = C:\Program Files (x86)\Mozilla Thunderbird
; TB-Anwendungsdaten
10 = C:\Users\Anna\Anwendungsdaten\Thunderbird[ZielPfad]
[/autoit]
1 = D:\Backup -
Hallo Anna,
mit folgendem Script erhälst Du aus Deiner ini ein Array aller Files/Folders
die in Deiner ini stehen.
Der 2. Wert gibt die jeweilige Größe der Datei an und in $aFiles[0][1] steht die Gesamtanzahl an Bytes.
Diese Angabe brauchst Du dann für Deinen Fortschrittbalken.Schöner wäre es, wenn die List-Funktion gleich die Dateigröße auslesen würde.
Dazu hatte ich aber jetzt keine Lust das umzubauen ...Ich hab Deine Ini etwas umgebaut, da es keinen Grund gibt das in mehrere Sektionen zu verteilen.
Wenn doch, dann kannst Du das ja anpassenScript:
FileListToArrayXT
[autoit]#include<Array.au3>
[/autoit] [autoit][/autoit] [autoit]
Global $aIniRead = IniReadSection('backup.ini', 'BackupVerzeichnisse')
Global $aTempFiles[1], $aFiles[1][2], $kFor $i = 1 To $aIniRead[0][0]
[/autoit] [autoit][/autoit] [autoit]
$aTemp = _FileListToArrayXT($aIniRead[$i][1], Default, 0 , 2, True, 0)
$aTemp[0] = $aIniRead[$i][1]
_ArrayConcatenate($aTempFiles, $aTemp)
$aTempFiles[0] += UBound($aTemp)
NextReDim $aFiles[$aTempFiles[0]+1][2]
[/autoit] [autoit][/autoit] [autoit]For $i = 0 To $aTempFiles[0]
[/autoit] [autoit][/autoit] [autoit]
$aFiles[$i][0] = $aTempFiles[$i]
$k = FileGetSize($aTempFiles[$i])
$aFiles[$i][1] = $k
$aFiles[0][1] += $k
Next_ArrayDisplay($aFiles)
[/autoit] [autoit][/autoit] [autoit]; #FUNCTION# ===========================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name: _FileListToArrayXT
; Description: Lists files and\or folders in specified path(s) (Similar to using Dir with the /B Switch)
; additional features: multi-path, multi-filter, multi-exclude-filter, path format options, recursive search
; Syntax: _FileListToArrayXT([$sPath = @ScriptDir, [$sFilter = "*", [$iRetItemType, [$bRecursive = False, [$sExclude = "", [$iRetFormat = 1]]]]]])
; Parameter(s): $sPath = optional: Search path(s), semicolon delimited (default: @ScriptDir)
; (Example: "C:\Tmp;D:\Temp")
; $sFilter = optional: Search filter(s), semicolon delimited . Wildcards allowed. (default: "*")
; (Example: "*.exe;*.txt")
; $iRetItemType = Include in search: 0 = Files and Folder, 1 = Files Only, 2 = Folders Only
; $iRetPathType = Returned element format: 0 = file/folder name only, 1 = relative path, 2 = full path
; $bRecursive = optional: True: recursive search including all subdirectories
; False (default): search only in specified folder
; $sExclude = optional: Exclude filter(s), semicolon delimited. Wildcards allowed.
; (Example: "Unins*" will remove all files/folders that begin with "Unins")
; $iRetFormat = optional: return format
; 0 = one-dimensional array, 0-based
; 1 = one-dimensional array, 1-based (default)
; 2 = String ( "|" delimited)
; Requirement(s): AutoIt Version 3.3.1.1 or newer
; Return Value(s): on success: 1-based or 0-based array or string (dependent on $iRetFormat)
; If no path is found, @error and @extended are set to 1, returns empty string
; If no filter is found, @error and @extended are set to 2, returns empty string
; If $iRetFormat is invalid, @error and @extended are set to 3, returns empty string
; If no data is found, @error and @extended are set to 4, returns empty string
; Author(s): Half the AutoIt Community
; ====================================================================================================
Func _FileListToArrayXT($sPath = @ScriptDir, $sFilter = "*", $iRetItemType = 0, $iRetPathType = 0, $bRecursive = False, $sExclude = "", $iRetFormat = 1)
Local $hSearchFile, $sFile, $sFileList, $sWorkPath, $sRetPath, $iRootPathLen, $iPCount, $iFCount, $fDirFlag;[check and prepare parameters]
[/autoit] [autoit][/autoit] [autoit]
;---------------
If $sPath = -1 Or $sPath = Default Then $sPath = @ScriptDir
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sPath = StringRegExpReplace(StringRegExpReplace($sPath, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check that at least one path is set
If $sPath = "" Then Return SetError(1, 1, "")
;-----
If $sFilter = -1 Or $sFilter = Default Then $sFilter = "*"
;prepare filter
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sFilter = StringRegExpReplace(StringRegExpReplace($sFilter, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;check for invalid chars or that at least one filter is set
If StringRegExp($sFilter, "[\\/><:\|]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
If $bRecursive Then
;Convert $sFilter for Regular Expression
$sFilter = StringRegExpReplace($sFilter, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sFilter = StringReplace($sFilter, "?", ".")
$sFilter = StringReplace($sFilter, "*", ".*?")
$sFilter = "(?i)\A(" & StringReplace($sFilter, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sFilter = "(?i)\A" & StringReplace($sFilter, ";", "|") & "\z"
EndIf
;-----
If $iRetItemType <> "1" And $iRetItemType <> "2" Then $iRetItemType = "0"
;-----
If $iRetPathType <> "1" And $iRetPathType <> "2" Then $iRetPathType = "0"
;-----
$bRecursive = ($bRecursive = "1")
;-----
If $sExclude = -1 Or $sExclude = Default Then $sExclude = ""
If $sExclude Then
;prepare $sExclude
;strip leading/trailing spaces and semi-colons, all adjacent semi-colons, and spaces surrounding semi-colons
$sExclude = StringRegExpReplace(StringRegExpReplace($sExclude, "(\s*;\s*)+", ";"), "\A;|;\z", "")
;Convert $sExclude for Regular Expression
$sExclude = StringRegExpReplace($sExclude, '([\Q\.+[^]$(){}=!\E])', '\\$1')
$sExclude = StringReplace($sExclude, "?", ".")
$sExclude = StringReplace($sExclude, "*", ".*?")
$sExclude = "(?i)\A(" & StringReplace($sExclude, ";", "$|") & "$)" ;case-insensitive, convert ';' to '|', match from first char, terminate strings
;$sExclude = "(?i)\A" & StringReplace($sExclude, ";", "|") & "\z"
EndIf
;-----
;If $iRetFormat <> "0" And $iRetFormat <> "2" Then $iRetFormat = "1"
If Not ($iRetItemType = 0 Or $iRetItemType = 1 Or $iRetItemType = 2) Then Return SetError(3, 3, "")
;---------------
;[/check and prepare parameters];---------------
[/autoit] [autoit][/autoit] [autoit]Local $aPath = StringSplit($sPath, ';', 1) ;paths array
[/autoit] [autoit][/autoit] [autoit]
Local $aFilter = StringSplit($sFilter, ';', 1) ;filters array;---------------
[/autoit] [autoit][/autoit] [autoit]If $bRecursive Then ;different handling for recursion (strategy: unfiltered search for all items and filter unwanted)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$fDirFlag = @extended
If StringRegExp($sFile, $sExclude) Then ContinueLoop
If $fDirFlag Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]
$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
If Not FileExists($sPath) Then ContinueLoop
$iRootPathLen = StringLen($sPath) - 1Local $aPathStack[1024] = [1, $sPath]
[/autoit] [autoit][/autoit] [autoit]While $aPathStack[0] > 0
[/autoit] [autoit][/autoit] [autoit]
$sWorkPath = $aPathStack[$aPathStack[0]]
$aPathStack[0] -= 1
;-----
$hSearchFile = FileFindFirstFile($sWorkPath & '*')
If @error Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sWorkPath
Case 1 ;relative path
$sRetPath = StringTrimLeft($sWorkPath, $iRootPathLen + 1)
EndSwitch
;-----
Switch $iRetItemType
Case 1
While True ;Files only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
ContinueLoop
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case 2
While True ;Folders only
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
EndIf
WEnd
Case Else
While True ;Files and Folders
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then
$aPathStack[0] += 1
If UBound($aPathStack) <= $aPathStack[0] Then ReDim $aPathStack[UBound($aPathStack) * 2]
$aPathStack[$aPathStack[0]] = $sWorkPath & $sFile & "\"
EndIf
If StringRegExp($sFile, $sFilter) Then
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
EndSwitch
;-----
WEndFileClose($hSearchFile)
[/autoit] [autoit][/autoit] [autoit]Next ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $bRecursive (strategy: filtered search for items)
[/autoit] [autoit][/autoit] [autoit]If $sExclude Then ;different handling dependent on $sExclude parameter is set or not
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
;check for exclude files
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
;check for exclude folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
;check for exclude files/folder
If StringRegExp($sFile, $sExclude) Then ContinueLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]Else ;If Not $sExclude
[/autoit] [autoit][/autoit] [autoit]For $iPCount = 1 To $aPath[0] ;Path loop
[/autoit] [autoit][/autoit] [autoit]$sPath = StringRegExpReplace($aPath[$iPCount], "[\\/]+\z", "") & "\" ;ensure exact one trailing slash
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists($sPath) Then ContinueLoop
;-----
Switch $iRetPathType
Case 2 ;full path
$sRetPath = $sPath
Case 1 ;relative path
$sRetPath = ""
EndSwitchFor $iFCount = 1 To $aFilter[0] ;filter loop
[/autoit] [autoit][/autoit] [autoit]
;-----
$hSearchFile = FileFindFirstFile($sPath & $aFilter[$iFCount])
If @error Then ContinueLoop
;-----
Switch $iRetItemType
Case 1 ;files Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ContinueLoop ;bypass folder
$sFileList &= $sRetPath & $sFile & "|"
WEnd
Case 2 ;folders Only
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
If @extended Then ;bypass file
$sFileList &= $sRetPath & $sFile & "|"
EndIf
WEnd
Case Else ;files and folders
While True
$sFile = FileFindNextFile($hSearchFile)
If @error Then ExitLoop
$sFileList &= $sRetPath & $sFile & "|"
WEnd
EndSwitch
FileClose($hSearchFile)
Next ;$iFCount - next filterNext ;$iPCount - next path
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $sExclude
[/autoit] [autoit][/autoit] [autoit]EndIf ;If $bRecursive
[/autoit] [autoit][/autoit] [autoit];---------------
[/autoit] [autoit][/autoit] [autoit];set according return value
[/autoit] [autoit][/autoit] [autoit]
If $sFileList Then
Switch $iRetFormat
Case 2 ;return a delimited string
Return StringTrimRight($sFileList, 1)
Case 0 ;return a 0-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 2)
Case Else ;return a 1-based array
Return StringSplit(StringTrimRight($sFileList, 1), "|", 1)
EndSwitch
Else
Return SetError(4, 4, "")
EndIfEndFunc ;==>_FileListToArrayXT
[/autoit]
und die von mir verwendete ini:Backup-ini
[autoit][BackupVerzeichnisse]
[/autoit]
;FileZilla
1 = C:\Users\Anna\Anwendungsdaten\FileZilla
; Trillian
2 = C:\Program Files (x86)\Trillian
; Webentwicklung
3 = E:\Webentwicklung
; Spiele
4 = E:\Spiele
; Fonts
5 = C:\Windows\Fonts
; Windows Sidebar
6 = C:\Users\Anna\AppData\Local\Microsoft\Windows Sidebar
; FF-Hauptverzeichniss
7 = C:\Program Files (x86)\Mozilla Firefox
; FF-Anwendungsdaten
8 = C:\Users\Anna\Anwendungsdaten\Mozilla
; TB-Hauptverzeichniss
9 = C:\Program Files (x86)\Mozilla Thunderbird
; TB-Anwendungsdaten
10 = C:\Users\Anna\Anwendungsdaten\Thunderbird -
also bei mir funzt das so.
Ich hab Windows 7 64bit.Spoiler anzeigen
[autoit]#RequireAdmin
[/autoit]
$InstallDir_XP="C:\Programme\AutoIt3"
$InstallDir_W7="C:\Program Files (x86)\AutoIt3"
;~ Benutzer soll die Rechte zum Ändern bekommen
If @OSVersion = "WIN_XP" Then
RunWait(@ComSpec & ' /c cacls "' & $InstallDir_XP & '" /T /E /G Benutzer:F', '', @SW_SHOW)
Else
RunWait(@ComSpec & ' /c cacls "' & $InstallDir_W7 & '" /T /E /G Benutzer:F', '', @SW_SHOW)
EndIf -
Lass bei den Parametern die " weg
[autoit]#RequireAdmin
[/autoit]
$InstallDir_XP="C:\Programme\CadStation\"
$InstallDir_W7="C:\Program Files (x86)\CadStation\"
;~ Benutzer soll die Rechte zum Ändern bekommen
If @OSVersion = "WIN_XP" Then
Run(@ComSpec & ' /c cacls "' & $InstallDir_XP & '" /T /E /G Benutzer:F', '', @SW_HIDE)
Else
Run(@ComSpec & ' /c cacls "' & $InstallDir_W7 & '" /T /E /G Benutzer:F', '', @SW_HIDE)
EndIf -
ich hab Dir Greenhorn's Ansatz mal vereinfacht "nur" auf Veränderung...
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#include<WindowsConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include<EditConstants.au3>
#include<Constants.au3>#region - GUI Create
[/autoit] [autoit][/autoit] [autoit]
GUICreate('')
Dim $vorgabe[5]
$vorgabe[0] = 4
$vorgabe[1] = 'test1'
$vorgabe[2] = 'test2'
$vorgabe[3] = 'test3'
$vorgabe[4] = 'test4'Dim $input[5]
[/autoit] [autoit][/autoit] [autoit]
$input[0] = 4
$input[1] = GUICtrlCreateInput("",10, 10,200, 20)
$input[2] = GUICtrlCreateInput("",10, 40,200, 20)
$input[3] = GUICtrlCreateInput("",10, 70,200, 20)
$input[4] = GUICtrlCreateInput("",10,100,200, 20)
$speichern = GUICtrlCreateButton("Speichern", 10,200,80,40)
GUICtrlSetState(-1, $GUI_DISABLE)
$IDC_EDIT = $input[1]
For $i = 1 To 4
GUICtrlSetData($input[$i], $vorgabe[$i])
Next
GuiRegisterMsg ($WM_COMMAND, "OnCommand"); erst jetzt erstellt, damit die Erstellung nicht gewertet wird
GUISetState()
#endregion#region - GUI SelectLoop
[/autoit] [autoit][/autoit] [autoit]
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitEndSelect
[/autoit] [autoit][/autoit] [autoit]
WEnd
#endregionFunc OnCommand($hwnd, $message, $wParam, $lParam)
[/autoit] [autoit][/autoit] [autoit]
If $input[1] >= ($lParam and LOWORD($wParam)) And ($lParam and LOWORD($wParam)) <= $input[4] Then
If GUICtrlRead(LOWORD($wParam)) <> $vorgabe[LOWORD($wParam)-2] Then GUICtrlSetState($speichern, $GUI_ENABLE); die '-2' ist der Versatz von Control-ID zum ArrayWert
If (HIWORD($wParam)) = $EN_CHANGE Then ConsoleWrite(GUICtrlRead(LOWORD($wParam)) & @CRLF); Ausgabe in der Console zum Testen
EndIf
Return $GUI_RUNDEFMSG
EndFuncFunc LOWORD($DWORD)
[/autoit] [autoit][/autoit] [autoit]
Return BitAND($DWORD, 0xFFFF)
EndFuncFunc HIWORD($DWORD)
[/autoit]
Return BitShift($DWORD, 16)
EndFunc -
mal ein kleines Beispiel quick & dirty...
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#region - GUI Create
[/autoit] [autoit][/autoit] [autoit]
GUICreate('')
Dim $vorgabe[5]
$vorgabe[0] = 4
$vorgabe[1] = 'test1'
$vorgabe[2] = 'test2'
$vorgabe[3] = 'test3'
$vorgabe[4] = 'test4'Dim $input[5]
[/autoit] [autoit][/autoit] [autoit]
$input[0] = 4
$input[1] = GUICtrlCreateInput("",10, 10,200, 20)
$input[2] = GUICtrlCreateInput("",10, 40,200, 20)
$input[3] = GUICtrlCreateInput("",10, 70,200, 20)
$input[4] = GUICtrlCreateInput("",10,100,200, 20)
$speichern = GUICtrlCreateButton("Speichern", 10,200,80,40)
GUICtrlSetState(-1, $GUI_DISABLE)
For $i = 1 To 4
GUICtrlSetData($input[$i], $vorgabe[$i])
NextGUISetState()
[/autoit] [autoit][/autoit] [autoit]
#endregionAdlibRegister("test", 250)
[/autoit] [autoit][/autoit] [autoit]#region - GUI SelectLoop
[/autoit] [autoit][/autoit] [autoit]
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitEndSelect
[/autoit] [autoit][/autoit] [autoit]
WEnd
#endregionFunc test()
[/autoit] [autoit][/autoit] [autoit][/autoit]
AdlibUnRegister("test")
For $i = 1 To $input[0]
If GUICtrlRead($input[$i]) <> $vorgabe[$i] Then GUICtrlSetState($speichern, $GUI_ENABLE)
Next
AdlibRegister("test", 250)
EndFunc -
warum so kompliziert?
Greenhorn's Ansatz ist eher ein professioneller ...Eine Schleife innnerhalb einer Funktion ist recht ungünstig.
Für Dein Problem hattest Du doch schon den richtigen Ansatz.
Verwende AdlibRegister ('PrüfeInputBoxen', 250)Wenn Du jetzt noch Deine Inputboxen als Array deklarierst, kannst Du recht einfach mit einer For Schleife
die Werte der DB (die Du ja ausgelesen hast und auch in einem Array gleicher Größe vorhalten solltest)
mit denen der Inputboxen.
Wenn <> dann GuiCtrlSetState ...ein deaktivieren brauchst Du eigentlich nicht, da es den Zustand nur beim Start gibt.
Das deaktivieren würde ich mit dem Einlesen eines neuen Datensatzes koppeln.Bei Fragen ...
-
RunWait wartet auf das Ende des aufgerufenen Programms.
Daher wartet Dein Script bis msiexec fertig ist. Dass willst Du aber gar nicht.
Daher nimm einfach Runzu 2: dazu musst Du Dein Script am Besten in den RegKey RunOnce legen.
Beim nächsten Start startet das Script einmal -
ich hab jetzt auch 2 Stunden mit dem Pfeil rumgespielt.
Bei mir klappt es nur, wenn der 3. Schlüssel in HKCU erstellt wird.
inlusive ico-Datei, 64-bit Support und einem Restart vom Explorer zum direkten testen ...Spoiler anzeigen
[autoit]#RequireAdmin
[/autoit] [autoit][/autoit] [autoit]Global $bEmptyIcon
[/autoit] [autoit][/autoit] [autoit]
$bEmptyIcon &= "0x0000010004000000000001002000FD020000460000003030000001002000A8250000430300002020000001002000A8100000EB2800001010000001002000680400009339000089504E470D0A1A0A0000000D49484452000001000000010008060000005C72A866000002C449444154789CEDDD516EDB30144451D5ABE412BDCAA21F059A02A99BD891228AF79C15D078338F960238DB0600000000000000000000000000000000000000000000AC648C713BFB0CC01B8584300B00C22C0008B300E004C9F761C90F0D13534808B30020CC028013781C86300B0000000000000000000000000000000000000000E042FC98247B1226802B70FBB3378102989DDB1FA2941FA2949F230917C08CDCFE10A5FC10A5FC10A5FC10A5FC10A5FC9C41E800CEE4F68728E58728E58728E58728E58728E56726C208F01DDCFE10A5FC10A5FC10A5FC10A5FC10A5FC5C819002ECC9ED0F51CA0F51CA0F51CA0F51CA0F51CA0F41638C9BF24390E24394F24394F24390E77D88527C5626DC0000000000000000000000000000000000000000000000709C1F671F80EFF1EA3F38B9DFEF3FF73E0B000000000000000000000000000000000000000000C063638CDBABBFAC0C5CD8CAC55FF68301C097AC7CFB03FFA1FC10E4851F44293E44293F44293F44293F44293F44293F44293F44293F44293F44293F4429FFC51920AF929D051822AF909B851826CF9097C518289F252B8B32583E22238B33601E918D0043E65FE422C4B0F99B3C04193ADB260759068F0CC4094097D9230451E6CE1FC2D062DEBC23141D66CD3B42D160CE3C241C6B335F3E24246B32573E4550D663A63C4560D6629E3C4D68D6608EBC4C78AECDFCF83221BA26736337C2742DE6C5AE040AE22C0188B30420CE1280384B00E22C0188B30420CE1280384B00E2C618378B00E22C0188B30420CE1280384B00E2BC1C042C02C02200368B00D82C0260F31703C8F36D00F06D00EA2C01AE4048010000000000000000000000000000000000000058D2CC3F103BEDC180E359000070A4591F030E3DD4AC1F1AF84D4121CC0280300B0038867700F066C63E4C77206011336E3C38D36C9D98EA30000000000000000000000000000000000000000000B0B45F8BC198C84F31E80A0000000049454E44AE426082280000003000000060000000010020000000000080250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FEFFFFFFFF7F0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FEFFFFFFFF7F0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000280000002000000040000000010020000000000080100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005858580200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000058585802000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
$bEmptyIcon &= "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFF7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFF7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2800000010000000200000000100200000000000400400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000585858020000000000000000000000000000000000000000000000000000000000000000000000000000000058585802000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000058585802000000000000000000000000000000000000000000000000000000000000000000000000000000005858580200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF0000FFFF0000DFFB0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000DFFB0000FFFF0000FFFF0000"Local $hFileOut = FileOpen(@SystemDir & "\Empty.ico", 2+8+16)
[/autoit] [autoit][/autoit] [autoit]
FileWrite($hFileOut, Binary($bEmptyIcon))
FileClose($hFileOut)$64bit = '64'
[/autoit] [autoit][/autoit] [autoit]
If @OSArch = 'X86' Then $64bit = ''If MsgBox(4+32+262144, 'Verknüpfungspfeil in Windows 7', 'Möchten Sie den Verknüpfungspfeil entfernen?' & @CRLF & @CRLF & 'Um den Verknüpfungspfeil wieder anzuzeigen' & @CRLF & 'drücken Sie auf "Nein"') = 6 Then
[/autoit] [autoit][/autoit] [autoit]
RegWrite('HKLM' & $64bit & '\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons', '29', 'REG_SZ', @SystemDir & '\empty.ico')
RegWrite('HKCR' & $64bit & '\lnkfile', 'IsShortcut', 'REG_SZ', '')
RegWrite('HKLM' & $64bit & '\Software\Microsoft\Windows\CurrentVersion\Explorer', 'link', 'REG_BINARY', '0x00000000')
Else
RegDelete('HKLM' & $64bit & '\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons', '29')
RegWrite('HKLM' & $64bit & '\Software\Microsoft\Windows\CurrentVersion\Explorer', 'link', 'REG_BINARY', '0x1e000000')
EndIfIf MsgBox(4+32+262144, 'Abmelden?', 'Die Änderung wird erst nach dem Neustart des Explorer wirksam.' & @CRLF & 'Möchten Sie den Explorer neu starten?') = 6 Then
[/autoit]
ShellExecuteWait(@SystemDir & '\taskkill.exe', '/F /IM explorer.exe', @SystemDir, 'open', @SW_HIDE)
Run(@ComSpec & " /c DEL " & @UserProfileDir & "\AppData\Local\IconCache.db /a", "", @SW_HIDE)
ShellExecute(@WindowsDir & '\explorer.exe')
EndIf
Exit -
mir sieht das Script leider sehr
nach einem Versuch aus einen Bot zu proggen...vote for close
-
-
bitte stelle einen in sich vollständigen Code ein.
Ich habe keine List erst alle Variablen zu deklarieren, bevor ich mir Deinen Fehler ansehen kann -
Spoiler anzeigen
[autoit]#include <Array.au3>
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#include <String.au3>do
[/autoit] [autoit][/autoit] [autoit]
$anzahl = InputBox("Info","Geben sie die anzahl ein:","")
Until Not @error$zeit = (($anzahl*7.2)/60)/60
[/autoit] [autoit][/autoit] [autoit]$teile = StringSplit($zeit,".")
[/autoit] [autoit][/autoit] [autoit]
Redim $teile[3]If $teile[2] = "" Then
[/autoit] [autoit][/autoit] [autoit]
$nb24h = ($teile[1] + @HOUR)
Else
$bruch = (100/$teile[2])
$min = Int(60/$bruch)*10
$nb24h = ($teile[1] + @HOUR)
EndIfIf $nb24h > "24:00" Then
[/autoit] [autoit][/autoit] [autoit]
$24h = ($nb24h - 24.00)
$hfertig = ($24h + "0:00")
MsgBox(64,"","" & $hfertig,10)Else
[/autoit]
MsgBox(64,"","" & $nb24h,10)
EndIf -
Die DezimalUhr läuft bei mir via Drag & Drop
-
über diese Methode werden keine includes geladen
Vielleicht ist das Dein Problem ... -
Da ich nicht weiß, wie lange xcopy zum Kopieren der Veränderungen braucht
deaktiviere ich den Aufruf mit AdlibUnRegister.
Um diesen wieder zu starten muss ich den Aufruf ja am Ende der Funktion wieder aktivieren