Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listbox to listbox that generates playlist
I know this is answered somewhere on the forum, but I can't seem to find the right words to search to get the correct results.

I need a list box that is populated by an element of id3 tags of mp3 files in a directory. Can't just use the file names, because they are just numbers...but the MP3's have information in the Title and Artist fields that are user friendly. I know all about MP3 id3 tags from post I'm pretty sure I could figure out how to populate a list with id3 tag data. The part I'm hun on is an add/remove and then a move up/move down that would populate or remove files from an adjacent list box. This would essentially build the order of a playlist that would save on a button press to create a windows media playlist.

Jimmy Vig
i havent downloaded the dll

to add to list box use soemthing like this

Function Function5
Copy      Help
SendMessage(id(4 hDlg) LB_ADDSTRING 0 x)

x should be the varible that holds the tag

maybe i should get some music and try it out lol

edit: missed last part of question. this is how to delete a selected item in list box.

Function Dialog3
Trigger F11     Help - how to add the trigger to the macro
Copy      Help
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str lb3 = "HEY[]THER[]HOW[]ARE[]YOU"
if(!ShowDialog("Dialog3" &Dialog3 &controls)) ret
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ListBox 0x54230101 0x200 0 2 132 86 ""
;4 Button 0x54032000 0x0 0 98 48 14 "add"
;5 Button 0x54032000 0x0 54 98 48 14 "remove"
;DIALOG EDITOR: "" 0x2030002 "" "" ""

sel message
,case WM_COMMAND goto messages2
sel wParam
,case 5
,str t
,int listbox=LB_SelectedItem(id(3 hDlg) t)
,SendMessage(id(3 hDlg) LB_DELETESTRING listbox t)
,case 4
,SendMessage(id(3 hDlg) LB_ADDSTRING 0 "HEY")
,case IDOK
ret 1

Forum Jump:

Users browsing this thread: 1 Guest(s)