Huhu,
Ich habe folgendes Problem:
Ich möchte mir einen kleinen Musicplayer selber schreiben so als Übung nur hab ich jetzt ein Problem mit den Arrays im Verzeichnis des Players sind unter \Music\ 13 Liederordner davon sind in 4 auch schon Lieder. Die Ordner werden allesammt links in einem Combo mit der Hauptüberschrift Interpret angezeigt. Daneben ist eine weiter Combo mit dem Namen Song. Eigentlich sollte wenn man einen der Interpreten auswählt rechts alle Songs die in dem Ordner des Interpreten sind erscheinen nur das tuen sie nicht das Combo Songs bleibt immer leer egal welchen Interpret man auswählt =/ hab schon ewig lange rumprobiert aber es funktioniert einfach nicht
Mfg Bloodykill aka Sevenby7
Spoiler anzeigen
$Interpret_Read=0
$Interpret=_FileListToArray("C:\Users\Bastian\Desktop\Sevenby7 Musicplayer\Music","*",2)
$A_max1=_ArrayMax($Interpret)
$Anz1=0
$A_Anz1=0
#include <GUIConstantsEx.au3>
#include <ComboConstants.au3>
#Include <File.au3>
#include <Array.au3>
Opt("GUIOnEventMode", 1)
GUICreate("Media Player V 1.0.0 Betha",400,400)
GUICtrlCreateTab(1,1,399,30)
GUICtrlCreateGroup("",300,31,99,367)
GUICtrlCreateTabItem("Player")
GUICtrlCreateButton("Play",305,43,89,44)
$Combo_Interpret=GUICtrlCreateCombo("Interpret",1,31,99,999,$CBS_OEMCONVERT)
$Combo_Song=Guictrlcreatecombo("Song",100,31,99,319)
GUICtrlCreateTabItem("Options")
$Aktualisieren=GUICtrlCreateButton("Aktualisieren",1,31,99,39)
GUICtrlSetOnEvent($Aktualisieren,"_aktualisieren")
$Player_Close=GUICtrlCreateButton("Player Schließen",100,31,99,39)
GUICtrlSetOnEvent($Player_Close,"_exit")
Guisetonevent(-3,"_exit")
_CreateInterpret()
GUISetState()
Func _CreateInterpret()
$Interpret=_FileListToArray("C:\Users\Bastian\Desktop\Sevenby7 Musicplayer\Music","*",2)
$A_max1=_ArrayMax($Interpret)
$A_Anz1=1
While $A_Anz1<=$A_max1
GUICtrlSetData($Combo_Interpret,$Interpret[$A_Anz1])
$A_Anz1=$A_Anz1+1
WEnd
$A_Anz1=1
EndFunc
While 1
$Interpret_Read=GUICtrlRead($Combo_Interpret) ;Liest aus welcher Interpret ausgewählt wurde
$A_max1=_ArrayMax($Interpret) ;Gibt die Anzahl der Interpreten zurück
While $A_Anz1<=$A_max1 ;Wiederhohlt schleife A solange die Schleifenzahl($A_Anz1)<=der Interpretenzahl($A_max1) ist.
If $Interpret_Read=$Interpret[$A_Anz1] Then ;Frägt ab ob der ausgewählte Interpretenname($Interpret_Read) in einem Array der Interpretenliste($Interpret[$A_Anz1]) enthallten ist.
$Songs=_FileListToArray("C:\Users\Bastian\Desktop\Sevenby7 Musicplayer\Music\"&$Interpret_Read,"*",1) ;Erställt ein Array als Songlist($Songs) welches den Namen aller Lieder im Ordner Music+Interpretennamen wiedergebt
$A_max2=_ArrayMax($Songs)
$A_Anz1=1
While $A_Anz1<=$A_max2
GUICtrlSetData($Combo_Song,$Songs[$A_Anz1])
$A_Anz1=$Anz1+1
WEnd
EndIf
$A_Anz1=$Anz1+1
WEnd
WEnd
Func _aktualisieren()
EndFunc
Func _exit()
Exit
EndFunc