right, so I got this app that will be used to play all my music via my internal 1Gb network.
I need help with the following:
I opted for a listbox for listing the availible music, but I have had to split it up into 1 listbox that shows all albums as soon as the page is shown, and when you double-click an album title, it ( should ) display ONLY the tracks in the selected album ( so far, it lists ALL tracks ) and when a track is double-clicked on, I would like it to play using the default player ( on my system its Real Player)
code for On Show:
Code for Listbox 1 ( Album list )tblAlbums = File.Find("AutoPlay\\Music", "", true, true)
if tblAlbums ~= nil then
for i,v in tblAlbums do
tblSplitPath = String.SplitPath(v)
ListBox.AddItem("ListBox1", tblSplitPath.Filename..tblSplitPath.Extension, tblSplitPath.Filename..tblSplitPath.Extension)
end
end
Code for Listbox 2 ( Tracks )tblTracks = File.Find("AutoPlay\\Music", "*.MP3", true, false)
if tblTracks ~= nil then
for i,v in tblTracks do
tblSplitPath = String.SplitPath(v)
ListBox.AddItem("ListBox2", tblSplitPath.Filename..tblSplitPath.Extension, tblSplitPath.Filename..tblSplitPath.Extension)
end
end
What I would like is when the first listbox is clicked on, it will display only the tracks in that album ( folder ) in Listbox2, and when a track is clicked on I;d like it to play.tblSelected = ListBox.GetSelected("ListBox1")
if tblSelected ~= nil then
strItemData = ListBox.GetItemData("ListBox1", tblSelected[1])
if strItemData ~= "" then
File.Open("AutoPlay\\Music"..strItemData, "", SW_MAXIMIZE)
end
end
Also, is there anyway to remove the .mp3 from the list of tracks? as in: example.mp3 -> example
Any and all help is welcome and well needed!
Thank you all!![]()

