NicoTn Posted September 12, 2008 Share Posted September 12, 2008 expandcollapse popup#include<GUIconstants.au3> #include<Sound.au3> Global Const $WS_POPUPWINDOW = 0x80880000 Global Const $WS_CAPTION = 0x00C00000 $mGui = GUICreate("Mp3.Player.4.0", 370, 200, -1, -1, $WS_CAPTION) $oButten = GUICtrlCreateButton("Open File",260,60,110,20) $menu_file = GUICtrlCreateMenu("File") $menu_options = GUICtrlCreateMenu("Options") $menu_Extra = GUICtrlCreateMenu("Extra") $vGroup = GUICtrlCreateGroup("Volume", 260, 0, 110, 55) $vSlider = GUICtrlCreateSlider(263,20,100,30) $song_list = GUICtrlCreateTreeView(5, 5, 250, 150) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $oButten then _opensong() WEnd Func _opensong() $sSong = FileOpenDialog("Open File",@MyDocumentsDir,"All (*.*)|Music files (*.mp3)") GUICtrlCreateTreeViewItem(_GetExtProperty($sSong,10),$song_list) for $i = 1 to 100 SoundSetWaveVolume($i) sleep(10) Next EndFunc Func _GetExtProperty($sPath, $iProp) ; Name = 0 ; Size = 1 ; Type = 2 ; DateModified = 3 ; DateCreated = 4 ; DateAccessed = 5 ; Attributes = 6 ; Status = 7 ; Owner = 8 ; Author = 9 ; Title = 10 ; Subject = 11 ; Category = 12 ; Pages = 13 ; Comments = 14 ; Copyright = 15 ; Artist = 16 ; AlbumTitle = 17 ; Year = 18 ; TrackNumber = 19 ; Genre = 20 ; Duration = 21 ; BitRate = 22 ; Protected = 23 ; CameraModel = 24 ; DatePictureTaken = 25 ; Dimensions = 26 ; Width = 27 ; Height = 28 ; Company = 30 ; Description = 31 ; FileVersion = 32 ; ProductName = 33 ; ProductVersion = 34 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 i want when i open a new sound that the old 1 stop playing.. i cant quite figure it out -.- while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size] Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 13, 2008 Share Posted September 13, 2008 SoundStop() or SoundClose(), it's in the helpfile. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
NicoTn Posted September 13, 2008 Author Share Posted September 13, 2008 i know that but i cant get it to work.. i cant get the sound to close when i open a new song while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size] 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