AZJIO Posted April 15, 2015 Share Posted April 15, 2015 I wanted to make an analogue of Scanner It is necessary to drag and drop a folder in the window expandcollapse popupAutoIt v3.3.8.1 ; попытка идеального распределения #include <GUIConstantsEx.au3> #include <StaticConstants.au3> Global $Stack[50], $Stack1[50], $a, $a1, $BL, $List='', $k ;, $a1[600][2] GUICreate("Графический просмотр каталога", 380, 410, -1, -1, -1, 0x00000010) $StatusBar = GUICtrlCreateLabel('Строка состояния AZJIO 2010.06.16', 5, 415 - 20, 370, 15, $SS_LEFTNOWORDWRAP) $CatchDrop = GUICtrlCreateLabel(" кинь сюда каталог", 0, 0, 380, 17, $SS_SUNKEN) GUICtrlSetState(-1, 8) $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) $BL=GUICtrlCreateButton ("L", 360 ,24,18,18) GUICtrlSetTip(-1, 'список файлов') $RE=GUICtrlCreateButton ("R", 340 ,24,18,18) GUICtrlSetTip(-1, 'Перезапуск утилиты') GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -13 If StringInStr(FileGetAttrib(@GUI_DragFile), "D") = 0 Then MsgBox(0, "Мелкая ошибка", 'Перетаскивайте каталог, а не файл.') ContinueLoop Else GUICtrlDelete($CatchDrop1) ;GUICtrlDelete($BL) GUICtrlDelete($a) GUICtrlDelete($a1) _Create() EndIf If $k = 0 Then $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) EndIf Case $msg = $RE _restart() Case $msg = $BL If $k <50 Then MsgBox(0, 'Список файлов', $List) Else If MsgBox(4, 'Список файлов', 'Слишком много, более 50,'&@CRLF&' хотите отправить список в буфер?')=6 Then ClipPut($List) EndIf Case $msg = -3 Exit EndSelect WEnd Func _Create() GUICtrlSetData($CatchDrop, @GUI_DragFile) FileFindNextFirst(@GUI_DragFile) $SizeTot=DirGetSize(@GUI_DragFile,2) ; размер каталога, подсчёт общего размера файлов $SizeMin = $SizeTot / 360 ; определяем минимальный размер отображаемого файла, не меньше градуса, количество байт приходящихся на один градус $Zdiff=0 ;создание графика $nach = 0 $List='' $k=0 $kT=0 $SizeTmp0=0 ;$SizeTotal=0 $a = GUICtrlCreateGraphic(10, 20, 360, 360) While 1 $tempname = FileFindNext('', 0, 1) If $tempname = "" Then ExitLoop $List&=StringRegExpReplace($tempname, '(^.*)\\(.*)$', '\2')&@CRLF $SizeTmp= FileGetSize($tempname) $kT+=1 ;$SizeTotal+=$SizeTmp If $SizeTmp<$SizeMin Then $SizeTmp0+=$SizeTmp ContinueLoop EndIf $Zdiff+=Mod($SizeTmp,$SizeMin) ; складываем остатки от деления в общую сумму If $Zdiff/$SizeMin >= 1 Then $Zdiff-=$SizeMin $SizeTmp+=$SizeMin EndIf $grad=Int($SizeTmp/$SizeMin) ; размер файла в градусах, угол файла (ширина сектора) $k+=1 GUICtrlSetGraphic($a, $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a, $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора ; $a1[$k][0] = GUICtrlCreateContextMenu($a) ; $a1[$k][1] = GUICtrlCreateMenuitem($tempname,$a1[$k][0]) ;MsgBox(0, 'ага', $nach&' начало сектора' &@CRLF& $grad& ' - размер сектора') ; попытка создать лейблы имён файлов ; If $k<7 Then ; GUICtrlCreateLabel($k, (90+$k*14)*cos($nach)+190, (90+$k*14)*sin($nach)+200, 10, 14) ; GUICtrlSetTip(-1, $tempname) ; EndIf $nach += $grad ; начальный угол отсчёта (смещение, сдвиг) WEnd GUICtrlSetState($a, 8) If $k = 0 Then Return $k ; жёлтый участок, размер этих файлов не позволяет задать угол в круговой диаграмме, так как он менее градуса. $grad=Int($SizeTmp0/$SizeMin) $k+=1 If $nach+$grad >= 359 Then $grad+=360-$nach-$grad GUICtrlSetGraphic($a, $GUI_GR_COLOR, 0, 0xe9de12) ; цвет сектора, жёлтый GUICtrlSetGraphic($a, $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора GUICtrlSetState(-1, 8) ;$nach += $grad ;Круг по центру $a1 = GUICtrlCreateGraphic(10, 20, 360, 360) ;GUICtrlSetGraphic($a1, $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a1, $GUI_GR_COLOR, 0, 0xe0dfe3) GUICtrlSetGraphic($a1, $GUI_GR_ELLIPSE, 135, 135, 90, 90) GUICtrlSetGraphic($a1, $GUI_GR_REFRESH) ;MsgBox(0, 'Сообщение', $nach) ;MsgBox(0, 'ага', $SizeTot&' размер в байтах' &@CRLF& $SizeTot/1024/1024& ' - размер в мегабайтах'&@CRLF& $SizeTotal& ' - размер в байтах по файлам'&@CRLF& $SizeTotal/1024/1024& ' - размер в мегабайтах по файлам') GUICtrlSetData($StatusBar, 'Размер ' & Round($SizeTot / 1024 / 1024,1) & ' Мб колич ' & $kT & ' путь ' & @GUI_DragFile) If $k <50 Then GUICtrlSetTip($CatchDrop,$List) Else GUICtrlSetTip($CatchDrop,'Слишком много файлов, более 50') EndIf EndFunc ;==>_Create ;======================================== ; функция поиска всех файлов в каталоге (NIKZZZZ+мод_AZJIO) Func FileFindNextFirst($FindCat) $Stack[0] = 1 $Stack1[1] = $FindCat $Stack[1] = FileFindFirstFile($FindCat & "\*.*") Return $Stack[1] EndFunc ;==>FileFindNextFirst Func FileFindNext($type = 'log', $mode = 0, $Level = 49) While 1 $file = FileFindNextFile($Stack[$Stack[0]]) If @error Then FileClose($Stack[$Stack[0]]) If $Stack[0] = 1 Then Return "" Else $Stack[0] -= 1 ContinueLoop EndIf Else If StringInStr(FileGetAttrib($Stack1[$Stack[0]] & "\" & $file), "D") > 0 Then If $Stack[0] = $Level Then ContinueLoop $Stack[0] += 1 $Stack1[$Stack[0]] = $Stack1[$Stack[0] - 1] & "\" & $file $Stack[$Stack[0]] = FileFindFirstFile($Stack1[$Stack[0]] & "\*.*") If $mode = 2 Then Return $Stack1[$Stack[0]] Else ContinueLoop EndIf Else If $mode = 2 Then ContinueLoop If $mode = 1 Then If StringInStr(';' & $type & ';', ';' & StringRight($Stack1[$Stack[0]] & "\" & $file, 3) & ';') = 0 Then ContinueLoop Else Return $Stack1[$Stack[0]] & "\" & $file EndIf Else Return $Stack1[$Stack[0]] & "\" & $file EndIf EndIf EndIf WEnd EndFunc ;==>FileFindNext Func _restart() Local $sAutoIt_File = @TempDir & "\~Au3_ScriptRestart_TempFile.au3" Local $sRunLine, $sScript_Content, $hFile $sRunLine = @ScriptFullPath If Not @Compiled Then $sRunLine = @AutoItExe & ' /AutoIt3ExecuteScript ""' & $sRunLine & '""' If $CmdLine[0] > 0 Then $sRunLine &= ' ' & $CmdLineRaw $sScript_Content &= '#NoTrayIcon' & @CRLF & _ 'While ProcessExists(' & @AutoItPID & ')' & @CRLF & _ ' Sleep(10)' & @CRLF & _ 'WEnd' & @CRLF & _ 'Run("' & $sRunLine & '")' & @CRLF & _ 'FileDelete(@ScriptFullPath)' & @CRLF $hFile = FileOpen($sAutoIt_File, 2) FileWrite($hFile, $sScript_Content) FileClose($hFile) Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & $sAutoIt_File & '"', @ScriptDir, @SW_HIDE) Sleep(1000) Exit EndFunc ;==>_restart +GUICtrlCreateLabel expandcollapse popup; попытка идеального распределения #include <GUIConstantsEx.au3> #include <StaticConstants.au3> Global $Stack[50], $Stack1[50], $a, $a1, $BL, $List='', $k, $aLab, $y[20] =['','','','','','','','','','','','','','','','','','','',''] GUICreate("Графический просмотр каталога", 380, 410, -1, -1, -1, 0x00000010) $StatusBar = GUICtrlCreateLabel('Строка состояния AZJIO 2010.06.16', 5, 415 - 20, 370, 15, $SS_LEFTNOWORDWRAP) $CatchDrop = GUICtrlCreateLabel(" кинь сюда каталог", 0, 0, 380, 17, $SS_SUNKEN) GUICtrlSetState(-1, 8) $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) $BL=GUICtrlCreateButton ("L", 360 ,24,18,18) GUICtrlSetTip(-1, 'Список крупных файлов') $RE=GUICtrlCreateButton ("R", 340 ,24,18,18) GUICtrlSetTip(-1, 'Перезапуск утилиты') GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -13 If StringInStr(FileGetAttrib(@GUI_DragFile), "D") = 0 Then MsgBox(0, "Мелкая ошибка", 'Перетаскивайте каталог, а не файл.') ContinueLoop Else GUICtrlDelete($CatchDrop1) ; GUICtrlDelete($BL) For $i = 1 to 19 If $y[$i] <>'' Then GUICtrlDelete($y[$i]) Next GUICtrlDelete($a) GUICtrlDelete($a1) _Create() EndIf If $k = 0 Then $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) EndIf Case $msg = $RE _restart() Case $msg = $BL MsgBox(0, 'Список крупных файлов', $List) ; If $k <50 Then ; MsgBox(0, 'Список крупных файлов', $List) ; Else ; If MsgBox(4, 'Список файлов', 'Слишком много, более 50,'&@CRLF&' хотите отправить список в буфер?')=6 Then ClipPut($List) ; EndIf Case $msg = -3 Exit EndSelect WEnd Func _Create() GUICtrlSetData($CatchDrop, @GUI_DragFile) FileFindNextFirst(@GUI_DragFile) $SizeTot=DirGetSize(@GUI_DragFile,2) ; размер каталога, подсчёт общего размера файлов $SizeMin = $SizeTot / 360 ; определяем минимальный размер отображаемого файла, не меньше градуса, количество байт приходящихся на один градус $Zdiff=0 ;создание графика $nach = 0 $List='' $k=0 $kT=0 $SizeTmp0=0 $Lab='' ;$SizeTotal=0 $a = GUICtrlCreateGraphic(10, 20, 360, 360) While 1 $tempname = FileFindNext('', 0, 1) If $tempname = "" Then ExitLoop ;$List&=StringRegExpReplace($tempname, '(^.*)\\(.*)$', '\2')&@CRLF $SizeTmp= FileGetSize($tempname) $kT+=1 ;$SizeTotal+=$SizeTmp If $SizeTmp<$SizeMin Then $SizeTmp0+=$SizeTmp ContinueLoop EndIf $Zdiff+=Mod($SizeTmp,$SizeMin) ; складываем остатки от деления в общую сумму If $Zdiff/$SizeMin >= 1 Then $Zdiff-=$SizeMin $SizeTmp+=$SizeMin EndIf $grad=Int($SizeTmp/$SizeMin) ; размер файла в градусах, угол файла (ширина сектора) $k+=1 GUICtrlSetGraphic($a, $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a, $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора ;MsgBox(0, 'ага', $nach&' начало сектора' &@CRLF& $grad& ' - размер сектора') ; попытка создать лейблы имён файлов $rp=($nach+$grad/2)*0.0174532925199433 If $grad>10 Then $Lab&='|'&170*cos(-$rp)+185&'|'&170*sin(-$rp)+195&'|'&$tempname ;If $grad>20 Then MsgBox(0, 'Сообщение', $nach+$grad/2&@CRLF&cos($rp)&' - cos'&@CRLF&sin($rp)&' - sin') $nach += $grad ; начальный угол отсчёта (смещение, сдвиг) WEnd GUICtrlSetState($a, 8) If $k = 0 Then Return $k ; жёлтый участок, размер этих файлов не позволяет задать угол в круговой диаграмме, так как он менее градуса. $grad=Int($SizeTmp0/$SizeMin) $k+=1 If $nach+$grad >= 359 Then $grad+=360-$nach-$grad GUICtrlSetGraphic($a, $GUI_GR_COLOR, 0, 0xe9de12) ; цвет сектора, жёлтый GUICtrlSetGraphic($a, $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора GUICtrlSetState(-1, 8) ;$nach += $grad ;Круг по центру $a1 = GUICtrlCreateGraphic(10, 20, 360, 360) ;GUICtrlSetGraphic($a1, $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a1, $GUI_GR_COLOR, 0, 0xe0dfe3) GUICtrlSetGraphic($a1, $GUI_GR_ELLIPSE, 135, 135, 90, 90) GUICtrlSetGraphic($a1, $GUI_GR_REFRESH) $aLab=StringSplit(StringTrimLeft($Lab, 1), '|') $rt=0 For $i = 1 to $aLab[0] Step 3 $rt+=1 $y[$rt]=GUICtrlCreateLabel($rt,$aLab[$i], $aLab[$i+1], 12, 14) ;Sleep(30) GUICtrlSetTip(-1, $aLab[$i+2]) ; $context = GUICtrlCreateContextMenu(-1) ; GUICtrlCreateMenuitem($aLab[$i+2],$context) $List&=$rt&') '&StringRegExpReplace($aLab[$i+2], '(^.*)\\(.*)$', '\2')&@CRLF ;MsgBox(0, 'Сообщение', $y[$rt]&' - ID'&@CRLF&$rt&' - №'&@CRLF&$aLab[$i]&' - слева'&@CRLF&$aLab[$i+1]&' - сверху'&@CRLF&$aLab[$i+2]) Next ;MsgBox(0, 'Сообщение', $nach) ;MsgBox(0, 'ага', $SizeTot&' размер в байтах' &@CRLF& $SizeTot/1024/1024& ' - размер в мегабайтах'&@CRLF& $SizeTotal& ' - размер в байтах по файлам'&@CRLF& $SizeTotal/1024/1024& ' - размер в мегабайтах по файлам') GUICtrlSetData($StatusBar, 'Размер ' & Round($SizeTot / 1024 / 1024,1) & ' Мб колич ' & $kT & ' путь ' & @GUI_DragFile) If $k <50 Then GUICtrlSetTip($CatchDrop,$List) Else GUICtrlSetTip($CatchDrop,'Слишком много файлов, более 50') EndIf EndFunc ;==>_Create ;======================================== ; функция поиска всех файлов в каталоге (NIKZZZZ+мод_AZJIO) Func FileFindNextFirst($FindCat) $Stack[0] = 1 $Stack1[1] = $FindCat $Stack[1] = FileFindFirstFile($FindCat & "\*.*") Return $Stack[1] EndFunc ;==>FileFindNextFirst Func FileFindNext($type = 'log', $mode = 0, $Level = 49) While 1 $file = FileFindNextFile($Stack[$Stack[0]]) If @error Then FileClose($Stack[$Stack[0]]) If $Stack[0] = 1 Then Return "" Else $Stack[0] -= 1 ContinueLoop EndIf Else If StringInStr(FileGetAttrib($Stack1[$Stack[0]] & "\" & $file), "D") > 0 Then If $Stack[0] = $Level Then ContinueLoop $Stack[0] += 1 $Stack1[$Stack[0]] = $Stack1[$Stack[0] - 1] & "\" & $file $Stack[$Stack[0]] = FileFindFirstFile($Stack1[$Stack[0]] & "\*.*") If $mode = 2 Then Return $Stack1[$Stack[0]] Else ContinueLoop EndIf Else If $mode = 2 Then ContinueLoop If $mode = 1 Then If StringInStr(';' & $type & ';', ';' & StringRight($Stack1[$Stack[0]] & "\" & $file, 3) & ';') = 0 Then ContinueLoop Else Return $Stack1[$Stack[0]] & "\" & $file EndIf Else Return $Stack1[$Stack[0]] & "\" & $file EndIf EndIf EndIf WEnd EndFunc ;==>FileFindNext Func _restart() Local $sAutoIt_File = @TempDir & "\~Au3_ScriptRestart_TempFile.au3" Local $sRunLine, $sScript_Content, $hFile $sRunLine = @ScriptFullPath If Not @Compiled Then $sRunLine = @AutoItExe & ' /AutoIt3ExecuteScript ""' & $sRunLine & '""' If $CmdLine[0] > 0 Then $sRunLine &= ' ' & $CmdLineRaw $sScript_Content &= '#NoTrayIcon' & @CRLF & _ 'While ProcessExists(' & @AutoItPID & ')' & @CRLF & _ ' Sleep(10)' & @CRLF & _ 'WEnd' & @CRLF & _ 'Run("' & $sRunLine & '")' & @CRLF & _ 'FileDelete(@ScriptFullPath)' & @CRLF $hFile = FileOpen($sAutoIt_File, 2) FileWrite($hFile, $sScript_Content) FileClose($hFile) Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & $sAutoIt_File & '"', @ScriptDir, @SW_HIDE) Sleep(1000) Exit EndFunc ;==>_restart . expandcollapse popup; попытка идеального распределения #include <GUIConstantsEx.au3> #include <StaticConstants.au3> Global $Stack[50], $Stack1[50], $a[600], $BL, $List='', $k ;, $a1[600][2] GUICreate("Графический просмотр каталога", 380, 410, -1, -1, -1, 0x00000010) $StatusBar = GUICtrlCreateLabel('Строка состояния AZJIO 2010.06.16', 5, 415 - 20, 370, 15, $SS_LEFTNOWORDWRAP) $CatchDrop = GUICtrlCreateLabel(" кинь сюда каталог", 0, 0, 380, 17, $SS_SUNKEN) GUICtrlSetState(-1, 8) $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) $BL=GUICtrlCreateButton ("L", 360 ,24,18,18) GUICtrlSetTip(-1, 'список файлов') $RE=GUICtrlCreateButton ("R", 340 ,24,18,18) GUICtrlSetTip(-1, 'Перезапуск утилиты') GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -13 If StringInStr(FileGetAttrib(@GUI_DragFile), "D") = 0 Then MsgBox(0, "Мелкая ошибка", 'Перетаскивайте каталог, а не файл.') ContinueLoop Else GUICtrlDelete($CatchDrop1) ;GUICtrlDelete($BL) For $i = 1 to $k+1 GUICtrlDelete($a[$i]) Next GUICtrlDelete($a) _Create() EndIf If $k = 0 Then $CatchDrop1 = GUICtrlCreateLabel("", 0, 20, 380, 360) GUICtrlSetState(-1, 136) EndIf Case $msg = $RE _restart() Case $msg = $BL If $k <50 Then MsgBox(0, 'Список файлов', $List) Else If MsgBox(4, 'Список файлов', 'Слишком много, более 50,'&@CRLF&' хотите отправить список в буфер?')=6 Then ClipPut($List) EndIf Case $msg = -3 Exit EndSelect WEnd Func _Create() GUICtrlSetData($CatchDrop, @GUI_DragFile) FileFindNextFirst(@GUI_DragFile) $SizeTot=DirGetSize(@GUI_DragFile,2) ; размер каталога, подсчёт общего размера файлов $SizeMin = $SizeTot / 360 ; определяем минимальный размер отображаемого файла, не меньше градуса, количество байт приходящихся на один градус $Zdiff=0 ;создание графика $nach = 0 $List='' $k=0 $kT=0 $SizeTmp0=0 ;$SizeTotal=0 While 1 $tempname = FileFindNext('', 0, 1) If $tempname = "" Then ExitLoop $List&=StringRegExpReplace($tempname, '(^.*)\\(.*)$', '\2')&@CRLF $SizeTmp= FileGetSize($tempname) $kT+=1 ;$SizeTotal+=$SizeTmp If $SizeTmp<$SizeMin Then $SizeTmp0+=$SizeTmp ContinueLoop EndIf $Zdiff+=Mod($SizeTmp,$SizeMin) ; складываем остатки от деления в общую сумму If $Zdiff/$SizeMin >= 1 Then $Zdiff-=$SizeMin $SizeTmp+=$SizeMin EndIf $grad=Int($SizeTmp/$SizeMin) ; размер файла в градусах, угол файла (ширина сектора) $k+=1 $a[$k] = GUICtrlCreateGraphic(10, 20, 360, 360) GUICtrlSetGraphic($a[$k], $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a[$k], $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора GUICtrlSetState(-1, 8) ; $a1[$k][0] = GUICtrlCreateContextMenu($a[$k]) ; $a1[$k][1] = GUICtrlCreateMenuitem($tempname,$a1[$k][0]) ;MsgBox(0, 'ага', $nach&' начало сектора' &@CRLF& $grad& ' - размер сектора') ; попытка создать лейблы имён файлов ; If $k<7 Then ; GUICtrlCreateLabel($k, (90+$k*14)*cos($nach)+190, (90+$k*14)*sin($nach)+200, 10, 14) ; GUICtrlSetTip(-1, $tempname) ; EndIf $nach += $grad ; начальный угол отсчёта (смещение, сдвиг) WEnd If $k = 0 Then Return $k ; жёлтый участок, размер этих файлов не позволяет задать угол в круговой диаграмме, так как он менее градуса. $grad=Int($SizeTmp0/$SizeMin) $k+=1 If $nach+$grad >= 359 Then $grad+=360-$nach-$grad $a[$k] = GUICtrlCreateGraphic(10, 20, 360, 360) GUICtrlSetGraphic($a[$k], $GUI_GR_COLOR, 0, 0xe9de12) ; цвет сектора, жёлтый GUICtrlSetGraphic($a[$k], $GUI_GR_PIE, 180, 180, 180, $nach, $grad) ; создание сектора GUICtrlSetState(-1, 8) ;$nach += $grad ;Круг по центру $a[$k+1] = GUICtrlCreateGraphic(10, 20, 360, 360) ;GUICtrlSetGraphic($a[$k+1], $GUI_GR_COLOR, 0, Dec(Random(50, 99, 1) & Random(50, 99, 1) & Random(50, 99, 1))) ; цвет сектора, рандомный GUICtrlSetGraphic($a[$k+1], $GUI_GR_COLOR, 0, 0xe0dfe3) GUICtrlSetGraphic($a[$k+1], $GUI_GR_ELLIPSE, 135, 135, 90, 90) GUICtrlSetGraphic($a[$k+1], $GUI_GR_REFRESH) ;MsgBox(0, 'Сообщение', $nach) ;MsgBox(0, 'ага', $SizeTot&' размер в байтах' &@CRLF& $SizeTot/1024/1024& ' - размер в мегабайтах'&@CRLF& $SizeTotal& ' - размер в байтах по файлам'&@CRLF& $SizeTotal/1024/1024& ' - размер в мегабайтах по файлам') GUICtrlSetData($StatusBar, 'Размер ' & Round($SizeTot / 1024 / 1024,1) & ' Мб колич ' & $kT & ' путь ' & @GUI_DragFile) If $k <50 Then GUICtrlSetTip($CatchDrop,$List) Else GUICtrlSetTip($CatchDrop,'Слишком много файлов, более 50') EndIf EndFunc ;==>_Create ;======================================== ; функция поиска всех файлов в каталоге (NIKZZZZ+мод_AZJIO) Func FileFindNextFirst($FindCat) $Stack[0] = 1 $Stack1[1] = $FindCat $Stack[1] = FileFindFirstFile($FindCat & "\*.*") Return $Stack[1] EndFunc ;==>FileFindNextFirst Func FileFindNext($type = 'log', $mode = 0, $Level = 49) While 1 $file = FileFindNextFile($Stack[$Stack[0]]) If @error Then FileClose($Stack[$Stack[0]]) If $Stack[0] = 1 Then Return "" Else $Stack[0] -= 1 ContinueLoop EndIf Else If StringInStr(FileGetAttrib($Stack1[$Stack[0]] & "\" & $file), "D") > 0 Then If $Stack[0] = $Level Then ContinueLoop $Stack[0] += 1 $Stack1[$Stack[0]] = $Stack1[$Stack[0] - 1] & "\" & $file $Stack[$Stack[0]] = FileFindFirstFile($Stack1[$Stack[0]] & "\*.*") If $mode = 2 Then Return $Stack1[$Stack[0]] Else ContinueLoop EndIf Else If $mode = 2 Then ContinueLoop If $mode = 1 Then If StringInStr(';' & $type & ';', ';' & StringRight($Stack1[$Stack[0]] & "\" & $file, 3) & ';') = 0 Then ContinueLoop Else Return $Stack1[$Stack[0]] & "\" & $file EndIf Else Return $Stack1[$Stack[0]] & "\" & $file EndIf EndIf EndIf WEnd EndFunc ;==>FileFindNext Func _restart() Local $sAutoIt_File = @TempDir & "\~Au3_ScriptRestart_TempFile.au3" Local $sRunLine, $sScript_Content, $hFile $sRunLine = @ScriptFullPath If Not @Compiled Then $sRunLine = @AutoItExe & ' /AutoIt3ExecuteScript ""' & $sRunLine & '""' If $CmdLine[0] > 0 Then $sRunLine &= ' ' & $CmdLineRaw $sScript_Content &= '#NoTrayIcon' & @CRLF & _ 'While ProcessExists(' & @AutoItPID & ')' & @CRLF & _ ' Sleep(10)' & @CRLF & _ 'WEnd' & @CRLF & _ 'Run("' & $sRunLine & '")' & @CRLF & _ 'FileDelete(@ScriptFullPath)' & @CRLF $hFile = FileOpen($sAutoIt_File, 2) FileWrite($hFile, $sScript_Content) FileClose($hFile) Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & $sAutoIt_File & '"', @ScriptDir, @SW_HIDE) Sleep(1000) Exit EndFunc ;==>_restart . Luigi, GerrOrneq and mLipok 3 My other projects or all Link to comment Share on other sites More sharing options...
GerrOrneq Posted April 21, 2015 Share Posted April 21, 2015 @AZJIO Hi, I like this idea, it would be great if you could fully emulate the 'scanner' I unfortunately have a problem when I copy and paste your scripts. Everything is in Russian (as I can see from the code boxes here) but when I paste it into SciTE (v3.4.4) all string contents are appearing as '?' (question marks.) (I am running the latest AutoIt and beta, under W7 32, English UK) One other thing, the three code boxes, what filenames are their contents meant to be saved under? Would it be possible for you to upload them in a RAR or Zip, maybe that would get around the problem. Thank You, keep up the good work. br DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown Link to comment Share on other sites More sharing options...
AZJIO Posted April 23, 2015 Author Share Posted April 23, 2015 (edited) 1. I converted in UTF-8 2. I did long ago, now a lot of things would change. But I use Linux and there is no wish to write with use of the Wine emulator. First you need to sort by size. Secondly, I would like to make a few layers. 3. I was not able to make a ToolTip when you hover over the graphic.screenshot of such programs Pie_chart_files.7z Edited April 23, 2015 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
GreenCan Posted April 23, 2015 Share Posted April 23, 2015 Nice idea Azijo, it makes me also think about Saleen FilePro http://www.saleensoftware.com/FilePro.aspx Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
GerrOrneq Posted April 23, 2015 Share Posted April 23, 2015 @ AZJIO Thank you for taking the time and effort to convert you script to english and also for posting it in an archive I have downloaded it and it reads and works fine. br. DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown Link to comment Share on other sites More sharing options...
GerrOrneq Posted April 25, 2015 Share Posted April 25, 2015 @ AZJIO Just as a matter of interest you may like to look at these:SequoiaView http://w3.win.tue.nl/en/research/research_computer_science/visualization/sequoiaview/about_treemaps/Disk Space Fanhttp://www.diskspacefan.com/ br. DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown Link to comment Share on other sites More sharing options...
AZJIO Posted April 26, 2015 Author Share Posted April 26, 2015 @GerrOrneqI looked at it. This is not the best and it's worth the money. I'd like to see in the Scanner was sorted by size. Scanner is for me one of the main tools to clean hard drive.@GreenCanI do not like this style. I don't perceive information in such representation. Here is a good option - "Folder Size Shell Extension v3.2" (WinXP). But it lacks the jump to folder to remove it. My other projects or all Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now