I was thinking more along the lines of a gui like the one i just whipped up in LogicGui below, where i can navigate the drive, then chose a file and play it.
Dreamora - Your step is what i need behind the button press.
TonyG - that will help too.
I guess if someone can tell me how to populate the 3 lists (Drive, Folder, Files) then i am 95% of the way there.
Like i said, i don't want to spend much time on this as i am doing something far more interesting to me, plus i don't even have any mp3 files to test it with, so if anyone can fill in the blanks with existing code then that would be appreciated.
Yes i know it is lazy but it is likely to be about 2 months before i am free to do it properly myself, plus i haven't done much of this maxgui stuff yet.
so any help would be appreciated.
'Source Code created on 09 Aug 2007 00:38:19 with Logic Gui Version 2.1 Build 248
'Glenn Dodd
Local MainWindow:TGadget = CreateWindow:TGadget("Logic_Gui",0,0,1280,968,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_MENU |WINDOW_STATUS |WINDOW_CLIENTCOORDS )
Local ChildWindow2:TGadget = CreateWindow:TGadget("ChildWindow2",228,52,487,434,MainWindow:TGadget,WINDOW_TITLEBAR|WINDOW_TOOL |WINDOW_CHILD)
Local Canvas1:TGadget = CreateCanvas:TGadget(11,-12,423,388,ChildWindow2:TGadget,Null)
Local lstDrive:TGadget = CreateListBox:TGadget(11,24,123,133,Canvas1:TGadget,Null)
Local lstFolders:TGadget = CreateListBox:TGadget(12,168,125,206,Canvas1:TGadget,Null)
Local lstFiles:TGadget = CreateListBox:TGadget(157,15,247,313,Canvas1:TGadget,Null)
Local butPlayMe:TGadget = CreateButton:TGadget("Play the Selected File",160,361,127,12,Canvas1:TGadget,BUTTON_PUSH)
Repeat
WaitEvent()
Select EventID()
Case EVENT_WINDOWCLOSE
Select EventSource()
Case MainWindow MainWindow_WC( MainWindow:TGadget )
Case ChildWindow2 ChildWindow2_WC( ChildWindow2:TGadget )
End Select
Case EVENT_GADGETACTION
Select EventSource()
Case lstDrive lstDrive_GA( lstDrive:TGadget , EventData() , EventExtra:Object() )
Case lstFolders lstFolders_GA( lstFolders:TGadget , EventData() , EventExtra:Object() )
Case lstFiles lstFiles_GA( lstFiles:TGadget , EventData() , EventExtra:Object() )
Case butPlayMe butPlayMe_GA( butPlayMe:TGadget )
End Select
Case EVENT_GADGETSELECT
Select EventSource()
Case lstDrive lstDrive_GS( lstDrive:TGadget , EventData() , EventExtra:Object() )
Case lstFolders lstFolders_GS( lstFolders:TGadget , EventData() , EventExtra:Object() )
Case lstFiles lstFiles_GS( lstFiles:TGadget , EventData() , EventExtra:Object() )
End Select
Case EVENT_GADGETMENU
Select EventSource()
Case lstDrive lstDrive_GM( lstDrive:TGadget , EventData() , EventExtra:Object() , MainWindow:TGadget )
End Select
End Select
Forever
Function MainWindow_WC( Window:TGadget )
DebugLog "Window MainWindow wants to be closed"
' HideGadget( Window:TGadget )
End
End Function
Function ChildWindow2_WC( Window:TGadget )
DebugLog "Window ChildWindow2 wants to be closed"
' HideGadget( Window:TGadget )
End
End Function
Function lstDrive_GA( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstDrive double clicked an Item " + Number
If Number => 0 DebugLog "Selected Text = "+ GadgetItemText( ListBox:TGadget , Number:Int )
End Function
Function lstFolders_GA( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstFolders double clicked an Item " + Number
If Number => 0 DebugLog "Selected Text = "+ GadgetItemText( ListBox:TGadget , Number:Int )
End Function
Function lstFiles_GA( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstFiles double clicked an Item " + Number
If Number => 0 DebugLog "Selected Text = "+ GadgetItemText( ListBox:TGadget , Number:Int )
End Function
Function butPlayMe_GA( Button:TGadget )
DebugLog "Button butPlayMe was pressed"
End Function
Function lstDrive_GS( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstDrive single clicked an Item"
End Function
Function lstFolders_GS( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstFolders single clicked an Item"
End Function
Function lstFiles_GS( ListBox:TGadget , Number:Int , Extra:Object )
DebugLog "ListBox lstFiles single clicked an Item"
End Function
Function lstDrive_GM( ListBox:TGadget , Number:Int , Extra:Object , Window:TGadget=Null )
DebugLog "ListBox lstDrive right clicked an Item"
End Function