Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Odtwarzacz v.3.1


Amfetaminek

Rekomendowane odpowiedzi

Opublikowano

Hej siemacie :)

Dedykuję tą pracę użytkownikowi kaje za pomoc :)

Oraz HrabiaMarkiz bo uważa że spambota kradnę gościowi o nicku "Feta":)

Więc odtwarzacz muzyki V3.1 jeżeli ktoś widział poprzednie wersje :)
pracuję właśnie nad dodaniem opcji podbicia basu.
I przypisaniu hotkey :)

posprawdzajcie jak możecie działanie tego skryptu :)

;Odtwarzacz by Amfetaminek!!! HrabiaMarkiz Feta to Amfetamina  Pozdro dla CB:)
#include <ButtonConstants.au3>
;~ #include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
;~ #include <WindowsConstants.au3>
#include <array.au3>
#include <File.au3>
#include <sound.au3>
;~ #include <GuiConstants.au3>
#include <GuiStatusBar.au3>
#NoTrayIcon
Dim $tab[1000][2]
Global Const $DebugIt = 1
Global Const $WM_COMMAND = 0x0111
Local $sFile = @ScriptDir & "\Test.txt"
global $Ilosc, $Ilosclog,$sound,$so1,$List1
Global $Folder, $prog , $sect,$Form
Global $btdel,$bdadd,$bturl,$btdela
global $q7
$ini1=IniRead(@ScriptDir &"\Player.ini","Il","","")
$tab[0][0]=$ini1
for $ini =1 to $ini1
	$tab[$ini][0]=IniRead(@ScriptDir &"\Player.ini","Folder", $ini,"")
	$tab[$ini][1]=IniRead(@ScriptDir &"\Player.ini","Song", $ini,"")
next
if not $tab[0][0] =""  Then $IL4=$tab[0][0]
$ini=true
if $tab[0][0] ="" then
$IL4=0
$ini = false
endif

$nextload=true
$fol1=True
$listactive = True
AdlibRegister("vol")
$start=false
$normalmode = True
$formdwa= true
$next=True
$Back = true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;playlist
func pl()
	if $formdwa = true then
	$Form = GUICreate("AmfiPlaylist", 277, 367, 460, 240)
	$bdadd = GUICtrlCreateButton("ADD" ,16, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$bturl = GUICtrlCreateButton("URL", 56, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$btdel = GUICtrlCreateButton("DEL", 100, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$btdela = GUICtrlCreateButton("clear", 140, 10, 40, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$List1 = GUICtrlCreateList("", 0, 44, 275, 327,0x00200000 + $GUI_DOCKAUTO)
GUISetState()

EndIf
	EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Player
$Form1 = GUICreate("AmfiPlayer", 277, 150, 460, 50)
$btback = GUICtrlCreateButton("<<", 16, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 0, "Impact")
$btplay = GUICtrlCreateButton(">", 40, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$btpause = GUICtrlCreateButton("\\", 64, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$btstop = GUICtrlCreateButton("t", 88, 88, 25, 25)
GUICtrlSetFont(-1, 48, 800, 0, "Impact")
$btnext = GUICtrlCreateButton(">>", 112, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$random = GUICtrlCreateCheckbox("Random", 150, 120, 55, 15)
$Label1 = GUICtrlCreateLabel("########################", 16, 16, 250, 26)
$Progress1 = GUICtrlCreateProgress(16, 48, 241, 25)
$Slider1 = GUICtrlCreateSlider(144, 88, 113, 17,BitOR($GUI_SS_DEFAULT_SLIDER,$TBS_TOP))
$playlistbtt = GUICtrlCreateButton("PL", 16, 120, 25, 25)
GUICtrlSetData($Slider1, 100)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")

pl()
 $formdwa = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KONIEC GUI



While 1
         $aMsg = GUIGetMsg(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;petla 
local $stat = _SoundStatus($sound)

IF $ini = True then
Listreview()
$ini=False

else
if $tab[0][0]=0 then
	MsgBox(0,"Error","First search files")
	find()
endif
endif
if $start=true Then
	if $normalmode = true Then
		if $stat = "stopped" Then
		$sound=	$tab[$q7][0]
		$stext= $tab[$q7][1]
			if $q7>$tab[0][0] then
			$q7 = 0
			endif
		_SoundPlay($sound,0)
		GUICtrlSetData($Label1,$stext)
		readprog()
		AdlibRegister("prog",$sect)

		$q7+=1

		EndIf
	else
		if $stat = "stopped" Then
		$sound=	$tab[$q7][0]
		$stext= $tab[$q7][1]
		_SoundPlay($sound,0)
		GUICtrlSetData($Label1,$stext)
		readprog()
		AdlibRegister("prog",$sect)
		$q7=random(1,$tab[0][0],1)
		endif
		endif
		EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; player
Switch $aMsg[1]
	Case $Form1
		Switch $aMsg[0]
				Case $GUI_EVENT_CLOSE
                         ExitLoop
				Case $playlistbtt
						 if $formdwa = True then
						 pl()
						 Listreview()
						  $formdwa = false
						else
							GUIDelete($Form)
							$formdwa = True
						endif
					case	$btplay
						if $stat = "paused" Then
								AdlibRegister("prog",$sect)
							_SoundResume($sound)
							EndIf
						$start= true
				case $btstop
							_SoundStop($Sound)
							$start = False
							$q7-=1
							AdlibUnRegister("prog")
							GUICtrlSetData($Progress1,0)
							$prog=0
				case $btpause
							_SoundPause($sound)
								AdlibUnRegister("prog")
							case $random
								if $normalmode = True then
									$normalmode=False
								Else
									$normalmode=True
									EndIf
								Case $btback
						_SoundStop($sound)
						if $start=true then
							if $normalmode = True  then
							$q7-=2
							if $q7 = 0 then
					$q7=$tab[0][0]
					endif
						else
							$q7=Random(1,$tab[0][0],1)
							Endif
							endif
						case $btnext
							_SoundStop($sound)
							if $normalmode = False and $start=true then
								$q7=Random(1,$tab[0][0],1)
							EndIf
		 EndSwitch
		 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;playlist


             Case $Form
                 Switch $aMsg[0]
                     Case $GUI_EVENT_CLOSE
                         GUIDelete($Form)
						 $formdwa = true
		Case $List1
		case $btdela
		 clear()
		Case $btdel
			Delete()
				AdlibUnRegister("prog")
				GUICtrlSetData($Progress1,0)
				$prog=0

		case $bturl
			$fol1=true
			Find()
		case $bdadd
			$fol1=false
			Find()

			EndSwitch
         EndSwitch
     WEnd


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FuncFind
Func Find()
	while 1
		$Folder=""
	If $fol1 = true then
    $Folder = FileSelectFolder("Wybierz folder.", "", 2)
	if @error=1 Then
		MsgBox(4096, "", "No File(s) chosen")
		find()
		ExitLoop
		endif
       if @error=1 Then
		 MsgBox(4096, "", "No File(s) chosen")
  else
	  $FileList = _FileListToArray($Folder,"*.mp3")
	  if @error=1 Then
		 MsgBox(4096, "", "No File(s) chosen")
	  Else
		$f=$IL4
		$f1 =  $FileList[0]
        for $f5=1 to $f1
		$sound=$Filelist[$f5]
		$Folder2=$Folder&"\"&$sound
		$f+=1
		$tab[$f][0]=$Folder2
		$tab[$f][1]=$sound
	next
	$IL4=$IL4+$f1
	$tab[0][0]=$IL4
		  endif
endif

		else
$var = FileOpenDialog("", @DesktopDir & "", "(*.mp3)",5 )
If @error Then
	MsgBox(4096, "", "No File(s) chosen")
Else
	Local $arr = StringSplit($var, '|', 1)
if $arr[0] = 1 Then
	$t3=$IL4
	$t3+=1
	$Folder=""
	$tekst=$arr[1]
	$arr = StringSplit($var, '\',1 )
	$Folder= $Folder&$arr[1]
	for $t1=2 to $arr[0]
	$Folder=$Folder&"\"&$arr[$t1]
next

$soundone=$arr[$arr[0]]
$tab[$t3][0]=$Folder
$tab[$t3][1]=$soundone
$IL4+=1
$Tab[0][0]=$IL4

$Folder=""
else
$Folder=$arr[1]
$t3=$IL4
$ts=$arr[0]
for $t5=2 to $ts
$sound22=$arr[$t5]
$t3+=1
$tab[$t3][0]=$Folder&"\"&$sound22
$tab[$t3][1]=$sound22
	next
	$IL4=$t3
	$Tab[0][0]=$IL4

endif
EndIf
EndIf
Listreview()
$start=True
ExitLoop
WEnd
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;odswierzania
Func Listreview()
	delini()
	$inir=0
	$Clean=""
	Guictrlsetdata($List1,$Clean)
		IniWrite(@ScriptDir &"\Player.ini","Il","",$tab[0][0])
		For $inir=1 to $tab[0][0]
			$inir3=$inir
			$Resultinir =$tab[$inir][1]
			$Resultinir2 =$tab[$inir][0]
				Guictrlsetdata($List1,$inir3&" - "&$Resultinir)
			IniWrite(@ScriptDir &"\Player.ini","Folder",$inir,$Resultinir2)
			IniWrite(@ScriptDir &"\Player.ini","Song",$inir,$Resultinir)
			next

	endfunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;usuwanie
Func Delete()
;~ 	Guictrlsetdata($Label1,"########################")

;~ 			GUICtrlSetData($Progress1,0)
;~ 	_SoundStop($Sound)
 		  If Not GUICtrlRead($List1) = "" Then

			 $fyy = _GUICtrlListBox_FindInText($List1, GUICtrlRead($List1))
			 $fyy+=1
			_ArrayDelete($tab,$fyy)
if $IL4>0 then
	$start=false
			$IL4=$IL4-1
			endif
			$Tab[0][0]=$IL4

			Listreview()
		EndIf

		  endfunc

		func deleteall()
			$start=false
			_SoundStop($Sound)
			$delall=$tab[0][0]
			$delal = 0
			For $delal = 0 to $delall
			_ArrayDelete($tab,$delal)
			next
			delini()
			Listreview()
			$IL4=0
			endfunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kasowanie ini
func delini()
	IniDelete(@ScriptDir &"\Player.ini","Folder")
	IniDelete(@ScriptDir &"\Player.ini","Il")
	IniDelete(@ScriptDir &"\Player.ini","Song")
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;glosnosc
Func vol()
			$slid=GUICtrlRead($Slider1)
			SoundSetWaveVolume( $slid )

		endfunc

			Func exit1()
				Exit
			EndFunc


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Progres
func readprog()
	GUICtrlSetData($Progress1,0)
	$sect=""
	$prog=0
	$so1=_SoundStatus($sound)
	If $so1="playing" then
$sect=_SoundLength($Sound,2)
$sect=$sect/1000
$sect=$sect/100*1000
AdlibRegister("prog",$sect)
EndIf
endfunc
func prog()
			$prog = $prog+ 1
GUICtrlSetData($Progress1, $prog)
			EndFunc
			func gui2()
	$Form1 = GUICreate("AmfiPlayer", 277, 465, 460, 429)
endfunc
;-------------------------------------------------------------------2kliklist
Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam)
    Local $nNotifyCode = _HiWord($wParam)
    Local $nID = _LoWord($wParam)
    Local $hCtrl = $lParam

    Local Const $LBN_DBLCLK = 2;


    Switch $nID
      Case $List1
        Switch $nNotifyCode
          Case $LBN_DBLCLK
if $start = false then
	$start= True
	EndIf
           $listactive = True
 			$readp1=GUICtrlRead($List1)
 			$fyy3 = _GUICtrlListBox_FindInText($List1, GUICtrlRead($List1))
			$q7=$fyy3+1
			_SoundStop($sound)


        EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc

Func _DebugPrint($s_text)
    ConsoleWrite( _
        "!===========================================================" & @LF & _
        "+===========================================================" & @LF & _
        "-->" & $s_text & @LF & _
        "+===========================================================" & @LF)
EndFunc

Func _HiWord($x)
    Return BitShift($x, 16)
EndFunc

Func _LoWord($x)
    Return BitAND($x, 0xFFFF)
EndFunc


;---------------------------------------------------------------------------------deleteall
func clear()
	delini()
	$clear1=$tab[0][0]

	for $cl1=0 to $clear1
	$tab[$cl1][0]=""
	$tab[$cl1][1]=""
next
Listreview()

	EndFunc

 


@Edit ~~~~~~~~~~~~~~

Zapomniałbym:D
Jeżeli ktoś chcę wykorzystać do czegoś ten skrypt niech się pyta.
I nie krytykuj :) Tylko oceń i powiedz co mogło być inaczej itd.
Ewentualnie jakiś błąd. Jeden na pewno znam :)
Ale już siły nie miałem.
Pozdro

v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
 

Opublikowano

Znowu zajebałeś pomysł dla użytkownika "Amfetaminek" nie ładnie xD

Mój pro złomek:

 

Procesor: Intel Pentium Dual-Core E5300 2.66 ghz | Karta graficzna: Asus Radeon HD 4350 | Mobo: Foxconn G31MX | RAM: 2gb ddr2 | Monitor: 1280x960 PnP | Zasilacz: Delta 300W

Opublikowano

Bardzo mi się nie podoba że kradnę swój pomysł...
Muszę się ukarać :)
Oceń może a nie spam robisz :D

v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
 

Opublikowano

Dzięki za opinie :)
Chyba jest błąd z czyszczeniem playlisty coś mi się wydaje.
Po dodaniu kolejnych plików zostawia puste pola:/

Tak że tu powinno być git :)

#include <ButtonConstants.au3>
;~ #include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
;~ #include <WindowsConstants.au3>
#include <array.au3>
#include <File.au3>
#include <sound.au3>
;~ #include <GuiConstants.au3>
#include <GuiStatusBar.au3>
#NoTrayIcon
Dim $tab[1000][2]
Global Const $DebugIt = 1
Global Const $WM_COMMAND = 0x0111
Local $sFile = @ScriptDir & "\Test.txt"
global $Ilosc, $Ilosclog,$sound,$so1,$List1
Global $Folder, $prog , $sect,$Form
Global $btdel,$bdadd,$bturl,$btdela
global $q7
$ini1=IniRead(@ScriptDir &"\Player.ini","Il","","")
$tab[0][0]=$ini1
for $ini =1 to $ini1
	$tab[$ini][0]=IniRead(@ScriptDir &"\Player.ini","Folder", $ini,"")
	$tab[$ini][1]=IniRead(@ScriptDir &"\Player.ini","Song", $ini,"")
next
if not $tab[0][0] =""  Then $IL4=$tab[0][0]
$ini=true
if $tab[0][0] ="" then
$IL4=0
$ini = false
endif

$nextload=true
$fol1=True
$listactive = True
AdlibRegister("vol")
$start=false
$normalmode = True
$formdwa= true
$next=True
$Back = true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;playlist
func pl()
	if $formdwa = true then
	$Form = GUICreate("AmfiPlaylist", 277, 367, 460, 240)
	$bdadd = GUICtrlCreateButton("ADD" ,16, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$bturl = GUICtrlCreateButton("URL", 56, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$btdel = GUICtrlCreateButton("DEL", 100, 10, 33, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$btdela = GUICtrlCreateButton("clear", 140, 10, 40, 25)
GUICtrlSetFont(-1, 11, 400, 0, "Impact")
$List1 = GUICtrlCreateList("", 0, 44, 275, 327,0x00200000 + $GUI_DOCKAUTO)
GUISetState()

EndIf
	EndFunc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Player
$Form1 = GUICreate("AmfiPlayer", 277, 150, 460, 50)
$btback = GUICtrlCreateButton("<<", 16, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 0, "Impact")
$btplay = GUICtrlCreateButton(">", 40, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$btpause = GUICtrlCreateButton("\\", 64, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$btstop = GUICtrlCreateButton("t", 88, 88, 25, 25)
GUICtrlSetFont(-1, 48, 800, 0, "Impact")
$btnext = GUICtrlCreateButton(">>", 112, 88, 25, 25)
GUICtrlSetFont(-1, 11, 800, 2, "Impact")
$random = GUICtrlCreateCheckbox("Random", 150, 120, 55, 15)
$Label1 = GUICtrlCreateLabel("########################", 16, 16, 250, 26)
$Progress1 = GUICtrlCreateProgress(16, 48, 241, 25)
$Slider1 = GUICtrlCreateSlider(144, 88, 113, 17,BitOR($GUI_SS_DEFAULT_SLIDER,$TBS_TOP))
$playlistbtt = GUICtrlCreateButton("PL", 16, 120, 25, 25)
GUICtrlSetData($Slider1, 100)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")

pl()
 $formdwa = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KONIEC GUI



While 1
         $aMsg = GUIGetMsg(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;petla 
local $stat = _SoundStatus($sound)

IF $ini = True then
Listreview()
$ini=False

else
if $tab[0][0]=0 then
	MsgBox(0,"Error","First search files")
	find()
endif
endif
if $start=true Then
	if $normalmode = true Then
		if $stat = "stopped" Then
		$sound=	$tab[$q7][0]
		$stext= $tab[$q7][1]
			if $q7>$tab[0][0] then
			$q7 = 0
			endif
		_SoundPlay($sound,0)
		GUICtrlSetData($Label1,$stext)
		readprog()
		AdlibRegister("prog",$sect)

		$q7+=1

		EndIf
	else
		if $stat = "stopped" Then
		$sound=	$tab[$q7][0]
		$stext= $tab[$q7][1]
		_SoundPlay($sound,0)
		GUICtrlSetData($Label1,$stext)
		readprog()
		AdlibRegister("prog",$sect)
		$q7=random(1,$tab[0][0],1)
		endif
		endif
		EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; player
Switch $aMsg[1]
	Case $Form1
		Switch $aMsg[0]
				Case $GUI_EVENT_CLOSE
                         ExitLoop
				Case $playlistbtt
						 if $formdwa = True then
						 pl()
						 Listreview()
						  $formdwa = false
						else
							GUIDelete($Form)
							$formdwa = True
						endif
					case	$btplay
						if $stat = "paused" Then
								AdlibRegister("prog",$sect)
							_SoundResume($sound)
							EndIf
						$start= true
				case $btstop
							_SoundStop($Sound)
							$start = False
							$q7-=1
							AdlibUnRegister("prog")
							GUICtrlSetData($Progress1,0)
							$prog=0
				case $btpause
							_SoundPause($sound)
								AdlibUnRegister("prog")
							case $random
								if $normalmode = True then
									$normalmode=False
								Else
									$normalmode=True
									EndIf
								Case $btback
						_SoundStop($sound)
						if $start=true then
							if $normalmode = True  then
							$q7-=2
							if $q7 = 0 then
					$q7=$tab[0][0]
					endif
						else
							$q7=Random(1,$tab[0][0],1)
							Endif
							endif
						case $btnext
							_SoundStop($sound)
							if $normalmode = False and $start=true then
								$q7=Random(1,$tab[0][0],1)
							EndIf
		 EndSwitch
		 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;playlist


             Case $Form
                 Switch $aMsg[0]
                     Case $GUI_EVENT_CLOSE
                         GUIDelete($Form)
						 $formdwa = true
		Case $List1
		case $btdela
		 clear()
		Case $btdel
			Delete()
				AdlibUnRegister("prog")
				GUICtrlSetData($Progress1,0)
				$prog=0

		case $bturl
			$fol1=true
			Find()
		case $bdadd
			$fol1=false
			Find()

			EndSwitch
         EndSwitch
     WEnd


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;FuncFind
Func Find()
	while 1
		$Folder=""
	If $fol1 = true then
    $Folder = FileSelectFolder("Wybierz folder.", "", 2)
	if @error=1 Then
		MsgBox(4096, "", "No File(s) chosen")
		find()
		ExitLoop
		endif
       if @error=1 Then
		 MsgBox(4096, "", "No File(s) chosen")
  else
	  $FileList = _FileListToArray($Folder,"*.mp3")
	  if @error=1 Then
		 MsgBox(4096, "", "No File(s) chosen")
	  Else
		$f=$IL4
		$f1 =  $FileList[0]
        for $f5=1 to $f1
		$sound=$Filelist[$f5]
		$Folder2=$Folder&"\"&$sound
		$f+=1
		$tab[$f][0]=$Folder2
		$tab[$f][1]=$sound
	next
	$IL4=$IL4+$f1
	$tab[0][0]=$IL4
		  endif
endif

		else
$var = FileOpenDialog("", @DesktopDir & "", "(*.mp3)",5 )
If @error Then
	MsgBox(4096, "", "No File(s) chosen")
Else
	Local $arr = StringSplit($var, '|', 1)
if $arr[0] = 1 Then
	$t3=$IL4
	$t3+=1
	$Folder=""
	$tekst=$arr[1]
	$arr = StringSplit($var, '\',1 )
	$Folder= $Folder&$arr[1]
	for $t1=2 to $arr[0]
	$Folder=$Folder&"\"&$arr[$t1]
next

$soundone=$arr[$arr[0]]
$tab[$t3][0]=$Folder
$tab[$t3][1]=$soundone
$IL4+=1
$Tab[0][0]=$IL4

$Folder=""
else
$Folder=$arr[1]
$t3=$IL4
$ts=$arr[0]
for $t5=2 to $ts
$sound22=$arr[$t5]
$t3+=1
$tab[$t3][0]=$Folder&"\"&$sound22
$tab[$t3][1]=$sound22
	next
	$IL4=$t3
	$Tab[0][0]=$IL4

endif
EndIf
EndIf
Listreview()
$start=True
ExitLoop
WEnd
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;odswierzania
Func Listreview()
	delini()
	$inir=0
	$Clean=""
	Guictrlsetdata($List1,$Clean)
		IniWrite(@ScriptDir &"\Player.ini","Il","",$tab[0][0])
		For $inir=1 to $tab[0][0]
			$inir3=$inir
			$Resultinir =$tab[$inir][1]
			$Resultinir2 =$tab[$inir][0]
				Guictrlsetdata($List1,$inir3&" - "&$Resultinir)
			IniWrite(@ScriptDir &"\Player.ini","Folder",$inir,$Resultinir2)
			IniWrite(@ScriptDir &"\Player.ini","Song",$inir,$Resultinir)
			next

	endfunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;usuwanie
Func Delete()
;~ 	Guictrlsetdata($Label1,"########################")

;~ 			GUICtrlSetData($Progress1,0)
;~ 	_SoundStop($Sound)
 		  If Not GUICtrlRead($List1) = "" Then

			 $fyy = _GUICtrlListBox_FindInText($List1, GUICtrlRead($List1))
			 $fyy+=1
			_ArrayDelete($tab,$fyy)
if $IL4>0 then
	$start=false
			$IL4=$IL4-1
			endif
			$Tab[0][0]=$IL4

			Listreview()
		EndIf

		  endfunc

		func deleteall()
			$start=false
			_SoundStop($Sound)
			$delall=$tab[0][0]
			$delal = 0
			For $delal = 0 to $delall
			_ArrayDelete($tab,$delal)
			next
			delini()
			Listreview()
			$IL4=0
			endfunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kasowanie ini
func delini()
	IniDelete(@ScriptDir &"\Player.ini","Folder")
	IniDelete(@ScriptDir &"\Player.ini","Il")
	IniDelete(@ScriptDir &"\Player.ini","Song")
EndFunc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;glosnosc
Func vol()
			$slid=GUICtrlRead($Slider1)
			SoundSetWaveVolume( $slid )

		endfunc

			Func exit1()
				Exit
			EndFunc


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Progres
func readprog()
	GUICtrlSetData($Progress1,0)
	$sect=""
	$prog=0
	$so1=_SoundStatus($sound)
	If $so1="playing" then
$sect=_SoundLength($Sound,2)
$sect=$sect/1000
$sect=$sect/100*1000
AdlibRegister("prog",$sect)
EndIf
endfunc
func prog()
			$prog = $prog+ 1
GUICtrlSetData($Progress1, $prog)
			EndFunc
			func gui2()
	$Form1 = GUICreate("AmfiPlayer", 277, 465, 460, 429)
endfunc
;-------------------------------------------------------------------2kliklist
Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam)
    Local $nNotifyCode = _HiWord($wParam)
    Local $nID = _LoWord($wParam)
    Local $hCtrl = $lParam

    Local Const $LBN_DBLCLK = 2;


    Switch $nID
      Case $List1
        Switch $nNotifyCode
          Case $LBN_DBLCLK
if $start = false then
	$start= True
	EndIf
           $listactive = True
 			$readp1=GUICtrlRead($List1)
 			$fyy3 = _GUICtrlListBox_FindInText($List1, GUICtrlRead($List1))
			$q7=$fyy3+1
			_SoundStop($sound)


        EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc

Func _DebugPrint($s_text)
    ConsoleWrite( _
        "!===========================================================" & @LF & _
        "+===========================================================" & @LF & _
        "-->" & $s_text & @LF & _
        "+===========================================================" & @LF)
EndFunc

Func _HiWord($x)
    Return BitShift($x, 16)
EndFunc

Func _LoWord($x)
    Return BitAND($x, 0xFFFF)
EndFunc


;---------------------------------------------------------------------------------deleteall
func clear()
	delini()
	$clear1=$tab[0][0]
$IL4=0
	for $cl1=0 to $clear1

	$tab[$cl1][0]=""
	$tab[$cl1][1]=""
next
Listreview()

	EndFunc

Fix :D

v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...