#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon
$FormM=GUICreate('Select Call Function',200,100,-1,-1)
$ButtonM=GUICtrlCreateButton('Call MP3',10,20,80,30)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ButtonM
Call('MP3')
EndSwitch
WEnd
Func MP3()
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon
$Form1 = GUICreate('Muti-Level Folder Creator', 400, 190,-1,-1)
Dim $n = 1, $l[15], $s[15]
For $n = 1 To 14
$l[$n] = GUICtrlCreateLabel("Lv" & $n, 12 + 70 * ($n - (Int(($n - 1) / 5)) * 5 - 1), 20 + 20 * (Int(($n - 1) / 5)), 30, 18)
$s[$n] = GUICtrlCreateInput("0", 45 + 70 * ($n - (Int(($n - 1) / 5)) * 5 - 1), 17 + 20 * (Int(($n - 1) / 5)), 30, 16, $ES_NUMBER)
GUICtrlSetLimit(-1, 4)
Next
$yml = GUICtrlCreateInput("", 11, 85, 290, 20)
$Button = GUICtrlCreateButton("Create Folder / Copy File", 10, 115, 220, 25)
$Button1 = GUICtrlCreateButton("Remove All", 240, 115, 134, 25)
$Button2 = GUICtrlCreateButton("Select Folder", 305, 84, 80, 22)
$Button3 = HotKeySet("{ESC}", "Terminate")
$xs = GUICtrlCreateLabel("0/0 ", 175, 170, 300, 15)
GUICtrlSetColor(-1, 0xff0000)
$jdt = GUICtrlCreateProgress(10, 150, 365, 12,$PBS_SMOOTH)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
exit
Case $Button
GUICtrlSetData($jdt, 0)
GUICtrlSetState($Button, $GUI_ENABLE)
Dim $ywc = 0, $zs = 0, $sc = 1,$f,$h
jc()
AdlibEnable("jdt")
If GUICtrlRead($s[1]) = 0 then
msgbox(16, 'Error', 'Please set the number of folders')
Else
$f=MsgBox(1+48,'Attention','You will create ' & $zs & ' folders.' &@CRLF& 'Do you wish to continue?')
Select
Case $f=1
scml()
sleep(300)
AdlibDisable()
msgbox(64, 'Finish', 'Created ' & $zs & ' Folders! ')
Case $f=2
ContinueLoop
EndSelect
DirMove('f1','.MP3', 1)
EndIf
GUICtrlSetState($Button,$GUI_ENABLE)
Case $Button1
$h=MsgBox(1+48,'Attention','Are you suren you want to Delete all the folders ?')
Select
Case $h=1
Del()
Case $h=2
ContinueLoop
EndSelect
Case $Button2
$ywjj = FileSelectFolder("Choose The Folder", "", 4)
If @error Then ContinueLoop
GUICtrlSetData($yml, $ywjj)
Case $Button3
Terminate()
EndSwitch
WEnd
Func Del()
DirRemove('.MP3',1)
EndFunc
Func jc()
For $i = 14 To 1 Step -1
$sl = GUICtrlRead($s[$i])
If $sl > 0 then
For $i1 = 1 To $i
$sl1 = GUICtrlRead($s[$i1])
If $sl1 = 0 then
GUICtrlSetData($s[$i1], 1)
$sl1 = 1
endif
$zs = $zs + ($sc * $sl1)
$sc = $sc * $sl1
Next
ExitLoop
Endif
Next
EndFunc ;==>jc
Func Terminate()
Exit 0
EndFunc
Func scml()
$ymlr = GUICtrlRead($yml)
$sl1 = GUICtrlRead($s[1])
For $i1 = 1 To $sl1
$fn1 = 'F'
$xml1 = $fn1 & $i1
DirCreate($xml1)
if $ymlr <> '' then DirCopy($ymlr, $xml1, 1)
$ywc = $ywc + 1
$sl2 = GUICtrlRead($s[2])
For $i2 = 1 To $sl2
$fn2 = $fn1 & $i1
$xml2 = $fn2 & '\' & $fn2 & '-' & $i2
DirCreate($xml2)
if $ymlr <> '' then DirCopy($ymlr, $xml2, 1)
$ywc = $ywc + 1
$sl3 = GUICtrlRead($s[3])
For $i3 = 1 To $sl3
$fn3 = $fn2 & '-' & $i2
$xml3 = $fn2 & '\' & $fn3 & '\' & $fn3 & '-' & $i3
DirCreate($xml3)
if $ymlr <> '' then DirCopy($ymlr, $xml3, 1)
$ywc = $ywc + 1
$sl4 = GUICtrlRead($s[4])
For $i4 = 1 To $sl4
$fn4 = $fn3 & '-' & $i3
$xml4 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn4 & '-' & $i4
DirCreate($xml4)
if $ymlr <> '' then DirCopy($ymlr, $xml4, 1)
$ywc = $ywc + 1
$sl5 = GUICtrlRead($s[5])
For $i5 = 1 To $sl5
$fn5 = $fn4 & '-' & $i4
$xml5 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn5 & '-' & $i5
DirCreate($xml5)
if $ymlr <> '' then DirCopy($ymlr, $xml5, 1)
$ywc = $ywc + 1
$sl6 = GUICtrlRead($s[6])
For $i6 = 1 To $sl6
$fn6 = $fn5 & '-' & $i5
$xml6 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn6 & '-' & $i6
DirCreate($xml6)
if $ymlr <> '' then DirCopy($ymlr, $xml6, 1)
$ywc = $ywc + 1
$sl7 = GUICtrlRead($s[7])
For $i7 = 1 To $sl7
$fn7 = $fn6 & '-' & $i6
$xml7 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn7 & '-' & $i7
DirCreate($xml7)
if $ymlr <> '' then DirCopy($ymlr, $xml7, 1)
$ywc = $ywc + 1
$sl8 = GUICtrlRead($s[8])
For $i8 = 1 To $sl8
$fn8 = $fn7 & '-' & $i7
$xml8 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn8 & '-' & $i8
DirCreate($xml8)
if $ymlr <> '' then DirCopy($ymlr, $xml8, 1)
$ywc = $ywc + 1
$sl9 = GUICtrlRead($s[9])
For $i9 = 1 To $sl9
$fn9 = $fn8 & '-' & $i8
$xml9 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn9 & '-' & $i9
DirCreate($xml9)
if $ymlr <> '' then DirCopy($ymlr, $xml9, 1)
$ywc = $ywc + 1
$sl10 = GUICtrlRead($s[10])
For $i10 = 1 To $sl10
$fn10 = $fn9 & '-' & $i9
$xml10 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn10 & '\' & $fn10 & '-' & $i10
DirCreate($xml10)
if $ymlr <> '' then DirCopy($ymlr, $xml10, 1)
$ywc = $ywc + 1
$sl11 = GUICtrlRead($s[11])
For $i11 = 1 To $sl11
$fn11 = $fn10 & '-' & $i10
$xml11 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn10 & '\' & $fn11 & '\' & $fn11 & '-' & $i11
DirCreate($xml11)
if $ymlr <> '' then DirCopy($ymlr, $xml11, 1)
$ywc = $ywc + 1
$sl12 = GUICtrlRead($s[12])
For $i12 = 1 To $sl12
$fn12 = $fn11 & '-' & $i11
$xml12 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn10 & '\' & $fn11 & '\'& $fn12 & '\' & $fn12 & '-' & $i12
DirCreate($xml12)
if $ymlr <> '' then DirCopy($ymlr, $xml12, 1)
$ywc = $ywc + 1
$sl13 = GUICtrlRead($s[13])
For $i13 = 1 To $sl13
$fn13 = $fn12 & '-' & $i12
$xml13 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn10 & '\' & $fn11 & '\'& $fn12 & '\'& $fn13 & '\' & $fn13 & '-' & $i13
DirCreate($xml13)
if $ymlr <> '' then DirCopy($ymlr, $xml13, 1)
$ywc = $ywc + 1
$sl14 = GUICtrlRead($s[14])
For $i14 = 1 To $sl14
$fn14 = $fn13 & '-' & $i13
$xml14 = $fn2 & '\' & $fn3 & '\' & $fn4 & '\' & $fn5 & '\' & $fn6 & '\' & $fn7 & '\' & $fn8 & '\' & $fn9 & '\' & $fn10 & '\' & $fn11 & '\'& $fn12 & '\'& $fn13 & '\'& $fn14 & '\' & $fn14 & '-' & $i14
DirCreate($xml14)
if $ymlr <> '' then DirCopy($ymlr, $xml14, 1)
$ywc = $ywc + 1
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Endfunc ;==>scml
Func jdt()
GUICtrlSetData($jdt, $ywc / $zs * 100)
GUICtrlSetData($xs, $ywc & '/' & $zs)
EndFunc ;==>jdt
EndFunc ;==> MP3