Автор: arr1val
Дата сообщения: 09.07.2008 18:33
Есть такой кодик, функция у него: поиск и перемещение/копирование нужной информации
Код:
#include <GuiConstants.au3>
#include <Math.au3>
$n=37
$j=$n-1
dim $box[$n]
$font="Tahoma"
$main = GUICreate("Название",350,550,-1,-1, $WS_POPUPWINDOW,$WS_EX_DLGMODALFRAME)
GUISetBkColor (0xFFFFFF)
If FileExists(@ScriptDir & "\vip.ini") then
$IP = IniReadSection (@ScriptDir & "\vip.ini", "IP")
$DIR = IniReadSection (@ScriptDir & "\vip.ini", "DIR")
EndIf
func mm($a, $b)
Run(@ComSpec & ' /c For /R "\\"' & $a & '"\D$\" %i In (*.xlsx;*.xlsm;*.docx;*.docm;*.rtf;*.doc;*.xls;*.pdf;*.ppt;*.msg) Do echo %i | findstr /i /v "\<CashProject \<Winnt \<шаблон \<Program">nul && MkDir "%i" "U:\"' & $b & '"\Removed\%~pi"', '', @SW_HIDE)
Run(@ComSpec & ' /c For /R "\\"' & $a & '"\D$\" %i In (*.xlsx;*.xlsm;*.docx;*.docm;*.rtf;*.doc;*.xls;*.pdf;*.ppt;*.msg) Do echo %i | findstr /i /v "exe\>">nul && move "%i" "U:\"' & $b & '"\Removed\%~pnxi"', '', @SW_HIDE)
EndFunc
GUICtrlCreateLabel ("Название", 115,20,150,30)
GUICtrlSetFont (-1,16, 550, -1, $font)
$but_2 = GUICtrlCreateButton ("Выход", 225, 500, 100, 20, $BS_DEFPUSHBUTTON)
$but_1 = GUICtrlCreateButton ("Move it", 20, 500, 100, 20, $BS_DEFPUSHBUTTON)
$but_3 = GUICtrlCreateButton ("Copy it", 122, 500, 100, 20, $BS_DEFPUSHBUTTON)
$but_4 = GUICtrlCreateButton ("Check All", 122, 450, 100, 20, $BS_DEFPUSHBUTTON)
GUICtrlCreateLabel ('',100,540,240,1,BitOr($SS_SIMPLE,$SS_SUNKEN))
GUICtrlCreateLabel ("© Все права защищены.", 10,535,150)
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetFont (-1,6, 550, -1, $font)
GuiCtrlCreateTab(10, 65, 325, 465)
GuiCtrlCreateTabItem("Списочег")
GUICtrlCreateGroup ("", 15, 85, 315, 325)
$treeTwo = GuiCtrlCreateTreeView(20, 100, 300, 300, $TVS_CHECKBOXES)
GUICtrlSetFont (-1,8, 550, -1, $font)
$box[1] = GuiCtrlCreateTreeViewItem("1", $treeTwo)
$box[31] = GuiCtrlCreateTreeViewItem("31", $treeTwo)
$box[2] = GuiCtrlCreateTreeViewItem("2", $treeTwo)
$box[3] = GuiCtrlCreateTreeViewItem("3", $treeTwo)
$box[4] = GuiCtrlCreateTreeViewItem("4", $treeTwo)
$box[5] = GuiCtrlCreateTreeViewItem("5", $treeTwo)
$box[6] = GuiCtrlCreateTreeViewItem("6", $treeTwo)
$box[7] = GuiCtrlCreateTreeViewItem("7", $treeTwo)
$box[8] = GuiCtrlCreateTreeViewItem("8", $treeTwo)
$box[9] = GuiCtrlCreateTreeViewItem("9", $treeTwo)
$box[10] = GuiCtrlCreateTreeViewItem("10", $treeTwo)
$box[11] = GuiCtrlCreateTreeViewItem("11", $treeTwo)
$box[12] = GuiCtrlCreateTreeViewItem("12", $treeTwo)
$box[13] = GuiCtrlCreateTreeViewItem("13", $treeTwo)
$box[14] = GuiCtrlCreateTreeViewItem("14", $treeTwo)
$box[15] = GuiCtrlCreateTreeViewItem("15", $treeTwo)
$box[16] = GuiCtrlCreateTreeViewItem("16", $treeTwo)
$box[17] = GuiCtrlCreateTreeViewItem("17", $treeTwo)
$box[18] = GuiCtrlCreateTreeViewItem("18", $treeTwo)
$box[19] = GuiCtrlCreateTreeViewItem("19", $treeTwo)
$box[20] = GuiCtrlCreateTreeViewItem("20", $treeTwo)
$box[21] = GuiCtrlCreateTreeViewItem("21", $treeTwo)
$box[22] = GuiCtrlCreateTreeViewItem("22", $treeTwo)
$box[23] = GuiCtrlCreateTreeViewItem("23", $treeTwo)
$box[24] = GuiCtrlCreateTreeViewItem("24", $treeTwo)
$box[25] = GuiCtrlCreateTreeViewItem("25", $treeTwo)
$box[26] = GuiCtrlCreateTreeViewItem("26", $treeTwo)
$box[27] = GuiCtrlCreateTreeViewItem("27", $treeTwo)
$box[28] = GuiCtrlCreateTreeViewItem("28", $treeTwo)
$box[29] = GuiCtrlCreateTreeViewItem("29", $treeTwo)
$box[30] = GuiCtrlCreateTreeViewItem("30", $treeTwo)
GuiCtrlCreateTabItem("Списочег2")
GUICtrlCreateGroup ("", 15, 85, 315, 325)
$treeTwo = GuiCtrlCreateTreeView(20, 100, 300, 300, $TVS_CHECKBOXES)
GUICtrlSetFont (-1,8, 550, -1, $font)
$box[32] = GuiCtrlCreateTreeViewItem("32", $treeTwo)
$box[33] = GuiCtrlCreateTreeViewItem("33", $treeTwo)
$box[34] = GuiCtrlCreateTreeViewItem("34", $treeTwo)
$box[35] = GuiCtrlCreateTreeViewItem("35", $treeTwo)
$box[36] = GuiCtrlCreateTreeViewItem("36", $treeTwo)
GuiCtrlCreateTabItem("")
GUISetState()
func ins($i)
for $e = 1 to $j
if $i = $e then
mm($IP[$i][1], $DIR[$i][1])
EndIf
next
EndFunc
;func ins2($i)
;EndFunc
While 1
$msg = GUIGetMsg()
If $msg = $but_1 Then
For $i=1 to $j
If GUICtrlRead($box[$i]) = 4 or GUICtrlRead($box[$i]) = 260 Then
Else
ins($i)
EndIf
next
EndIf
If $msg = $but_3 Then
For $i=1 to $j
If GUICtrlRead($box[$i]) = 4 or GUICtrlRead($box[$i]) = 260 Then
Else
ins2($i)
EndIf
next
EndIf
If $msg = $but_2 Then
ExitLoop
EndIf
If $msg = $but_4 Then
For $i = 1 to $j
GUICtrlSetState ( $box[$i], $GUI_CHECKED)
Next
EndIf
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend