(^_^) Posted February 25, 2007 Share Posted February 25, 2007 ive had this one made for a while but i never posted it expandcollapse popup#include <GUIConstants.au3> $player = GUICreate("music player", 220, 200, 180, 125, -1, $WS_EX_ACCEPTFILES) GUISetState(@SW_SHOW,$player) $play = GUICtrlCreateButton("Play", 3, 3, 58, 25) $stop = GUICtrlCreateButton("Stop", 63, 3, 52, 25) $open = GUICtrlCreateButton("Open", 117, 3, 52, 25) $Volume = GuiCtrlCreateSlider(3, 50, 165, 20) GuiCtrlCreateLabel("Volume", 3, 35, 40, 20) $list = GuiCtrlCreateList('', 3, 105, 215, 115) GUICtrlSetData($Volume, 100) $updown = GUICtrlCreateUpdown($list) $VolLevel = 100 GUISetState() Func _GetExtProperty($sPath, $iProp) Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty $iExist = FileExists($sPath) If $iExist = 0 Then SetError(1) Return 0 Else $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1)) $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1))) $oShellApp = ObjCreate ("shell.application") $oDir = $oShellApp.NameSpace ($sDir) $oFile = $oDir.Parsename ($sFile) If $iProp = -1 Then Local $aProperty[35] For $i = 0 To 34 $aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i) Next Return $aProperty Else $sProperty = $oDir.GetDetailsOf ($oFile, $iProp) If $sProperty = "" Then Return 0 Else Return $sProperty EndIf EndIf EndIf EndFunc While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit Case GUICtrlread($Volume) <> $VolLevel $VolLevel = GUICtrlRead($Volume) SoundSetWaveVolume ($VolLevel) Case $msg = $open $song = FileOpenDialog("open", @MyDocumentsDir, "MP3's (*.mp3)|WAV's (*.wav)", 2) $title = _GetExtProperty($song,10) $artist = _GetExtProperty($song,16) $time = _GetExtProperty($song,21) GUICtrlSetData($list, $artist &" - " & $title & " " & $time & " " & $song) Case $msg = $play $Selection = GuiCtrlRead($list) $result = StringInStr($Selection, "C:\") $cut = StringTrimLeft($Selection, $result -1) $title = _GetExtProperty($cut,10) $artist = _GetExtProperty($cut,16) GuiCtrlCreateLabel($artist & " - " & $title, 3, 70, 215, 20) Soundplay ($cut) Case $msg = $stop soundplay("") EndSelect WEnd [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center] Link to comment Share on other sites More sharing options...
_Kurt Posted February 25, 2007 Share Posted February 25, 2007 I was thinking of making one of these, except more complicated Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now