LIMITER Posted February 9, 2008 Posted February 9, 2008 (edited) NEW VERSION 4.0.0.7 !!! - BETANOTE: When you run it for the first time, run it with the -reset parameter as the settings structure has been modified !!! Finally here is the new, long awaited, LMP 4.0 ! The new version brings a "rock solid" GUI, improved stablillity,a new GDI+ visualization and is even more gentle with the resources.The code suffered a rewrite which was a difficult challenge, and maybe there are some bugs that emerged while others were fixed, so keep in mind that this is still BETA and we taught that it was stable enough to share.FORMATS SUPPORTED- MP3 - MP2 - MP1 - WAV - OGG - AIFFCOMMAND LINE PARAMETERS-reset Resets LMP's settings to default valuesL|M|TER Media Player COMPILEDGet compiled code here !L|M|TER Media Player SOURCEGet source here !L|M|TER Media Player TICKETSReport bugs here ! Edited February 10, 2009 by LIMITER
Swift Posted February 9, 2008 Posted February 9, 2008 (edited) You Know 90% Of The People On Here Will Not Run That .exe. We All Need Source. Sorry. Its Trust. The Longer You Stay. The More You Get. Post The Source! I wont run it either. Sorry. Edited February 9, 2008 by Swift
LIMITER Posted February 9, 2008 Author Posted February 9, 2008 (edited) You Know 90% Of The People On Here Will Not Run That .exe.We All Need Source. Sorry. Its Trust. The Longer You Stay. The More You Get.Post The Source!I wont run it either. Sorry.I added the source Enjoy ! Edited June 18, 2008 by LIMITER
LIMITER Posted February 9, 2008 Author Posted February 9, 2008 (edited) Swift ... do you have some improvement idea ? or to make it simple ? Edited June 18, 2008 by LIMITER
Achilles Posted February 9, 2008 Posted February 9, 2008 The GUI looks great. Suggestions: -Add recursive methods for adding files (like if someone clicks to add "My Music" it will go through all the folders) -Let the user seek (play anywhere in the file) -In song information the Ok button is mostly covered by labels so you can only click it a certain part -Pause stops the song -In the list, showing the whole directory looks kind of ugly... Maybe make it like iTunes where there are columns for each thing, like Artist, Name, Album, Directory.. And all those can be turned on or off... I like what you have so far but there are many improvements you could make. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
gseller Posted February 9, 2008 Posted February 9, 2008 I agree with Piano Man, GUI is great! To go along with Piano Man's suggestions I would Suggestion: Update to 3.2.10.0 syntax Add Doubleclick and or right click to the listview area.
Swift Posted February 9, 2008 Posted February 9, 2008 (edited) It doesnt work. >.> #include <ExtProp.au3> that isnt a file in any versions of autoit...im using .10/beta...? any ideas? Got extprop...ok..it looks very good...some suggestions: 1) allow user to double-click the song to play it 2) add in the setting box: Minimize to tray? 3) make ALL the windows fade-in-out...because you have half...but all would be nice... GREAT!! I LOVE IT!!!! Edited February 9, 2008 by Swift
BananaFredSoft Posted February 10, 2008 Posted February 10, 2008 Yay! New media player! Cool! Check out mine...it's in my sig, you could get some ideas. Yours looks great, but you might want to add the library functions etc. -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
LIMITER Posted February 10, 2008 Author Posted February 10, 2008 (edited) I read all suggestions and implemented them in the new version of LMP3.1.0 RELEASE NEW VERSION !!!!!!!! Edited February 10, 2008 by LIMITER
BananaFredSoft Posted February 10, 2008 Posted February 10, 2008 How about making it so you can add individual songs? -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
Swift Posted February 10, 2008 Posted February 10, 2008 How about making it so you can add individual songs?You Can.
Swift Posted February 10, 2008 Posted February 10, 2008 (edited) Hey...With The New Update...Some Of My Songs Are Showing Up As: 0 0 0 Why? Found A Bug...When Enabling Minimize To Tray...It Has This: Line 197 (File:.......) Case $tray_hide Case ^ ERROR Variable Used Without Being Delcared! Edited February 10, 2008 by Swift
BananaFredSoft Posted February 10, 2008 Posted February 10, 2008 (edited) You Can. Okay! Edit: I added it, but now I'm trying to test it and apparently I need "GUIEnhance.au3" Edit2: OK, found it, I have successfully added "Add File!" expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=lmp.ico #AutoIt3Wrapper_outfile=lmp.exe #AutoIt3Wrapper_Compression=4 ://////=__= #AutoIt3Wrapper_Res_Fileversion=3.1.0.0 #AutoIt3Wrapper_Res_LegalCopyright=? 2008 - L|M|TER #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> #include <GuiStatusBar.au3> #include <Sound.au3> #include <ExtProp.au3> #include <File.au3> #include <GUIEnhance.au3> #include <IE.au3> #include <Date.au3> $cver = "3.1.0" AutoItSetOption("TrayMenuMode", 1) TraySetToolTip("L|M|TER Media Player v. " & $cver) ;Creating ini $inipath = @WindowsDir & "\lmp.ini" If FileExists($inipath) = 0 Then IniWriteSection($inipath,"Auto-Update","Enabled=1") IniWriteSection($inipath,"Minimize To Tray","Enabled=1") EndIf ;Install images $loimg = @TempDir & "\lmplogo.bmp" FileInstall("D:\de pe c\AutoIt\LMP\lmplogo-new.bmp", $loimg, 1) $paimg = @TempDir & "\pauseb.bmp" FileInstall("D:\de pe c\AutoIt\LMP\pause-new.bmp", $paimg, 1) $plimg = @TempDir & "\playb.bmp" FileInstall("D:\de pe c\AutoIt\LMP\play-new.bmp", $plimg, 1) $stimg = @TempDir & "\stopb.bmp" FileInstall("D:\de pe c\AutoIt\LMP\stop-new.bmp", $stimg, 1) $brimg = @TempDir & "\browseb.bmp" FileInstall("D:\de pe c\AutoIt\LMP\browse-new.bmp", $brimg, 1) ;~ Splash SplashImageOn("", $loimg, 476, 117, Default, Default, 1) Sleep(2000) SplashOff() ;Update check If FileReadLine($inipath,2) = "Enabled=1" Then InetGet("http://limiter.evonet.ro/lmp.ver", @TempDir & "\lmp.ver", 1, 1) If @error Then MsgBox(32, "LMP Update", "There was a problem contacting the server, try again later ...") While @InetGetActive WEnd SplashOff() $dat = FileOpen(@TempDir & "\lmp.ver", 0) Global $nver = FileReadLine($dat, 1) FileClose($dat) If $nver = $cver Then TrayTip("L|M|TER Media Player", "There is no new version of LMP ...", 2, 1) Sleep(3000) TrayTip("", "", 0) EndIf If $nver > $cver Then Call("update") EndIf EndIf ;~ Main GUI #Region ### START Koda GUI section ### Form= $gui = GUICreate("", 634, 465, 190, 121) GUISetBkColor(0xD8E4F8) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") $logo = GUICtrlCreatePic($loimg, 80, 0, 476, 117, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $playlist = GUICtrlCreateListView("Artist|Title|Album|Path", 8, 202, 618, 214) GUICtrlSendMsg(-1, 0x101E, 0, 150) GUICtrlSendMsg(-1, 0x101E, 1, 150) GUICtrlSendMsg(-1, 0x101E, 2, 150) GUICtrlSendMsg(-1, 0x101E, 3, 160) $play = GUICtrlCreateButton("", 8, 144, 49, 49, $BS_BITMAP) GUICtrlSetImage($play, $plimg, 0) GUICtrlSetTip($play, "Play the selected song", "L|M|TER Media Player", 1, 1) $pause = GUICtrlCreateButton("", 64, 144, 49, 49, $BS_BITMAP) GUICtrlSetImage($pause, $paimg, 0) GUICtrlSetTip($pause, "Pause the playing song", "L|M|TER Media Player", 1, 1) $stop = GUICtrlCreateButton("", 120, 144, 49, 49, $BS_BITMAP) GUICtrlSetImage($stop, $stimg, 0) GUICtrlSetTip($stop, "Stop the playing song", "L|M|TER Media Player", 1, 1) $browse = GUICtrlCreateButton("", 176, 144, 49, 49, $BS_BITMAP) GUICtrlSetImage($browse, $brimg, 0) GUICtrlSetTip($browse, "Browse for a directory to add to the playlist", "L|M|TER Media Player", 1, 1) $about = GUICtrlCreateButton("&About", 544, 144, 75, 25, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $help = GUICtrlCreateButton("&Help", 544, 168, 75, 25, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $songinfo = GUICtrlCreateButton("Song Information", 432, 144, 107, 49, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetTip($songinfo, "Displays a new window containing the current song's information", "L|M|TER Media Player", 1, 1) $Label2 = GUICtrlCreateLabel("Elapsed :", 240, 152, 48, 17) $Label3 = GUICtrlCreateLabel("Remaining :", 240, 168, 60, 17) $elapsedt = GUICtrlCreateLabel("00:00:00", 304, 152, 46, 17) $remainingt = GUICtrlCreateLabel("00:00:00", 304, 168, 46, 17) $file = GUICtrlCreateMenu("File") $adddir = GUICtrlCreateMenuItem("Add dir", $file) $addfile = GUICtrlCreateMenuItem("Add File", $file) $exit = GUICtrlCreateMenuItem("Exit", $file) $settings1 = GUICtrlCreateMenu("Settings") $settings = GUICtrlCreateMenuItem("Settings", $settings1) $hel = GUICtrlCreateMenu("Help") $helpmenu = GUICtrlCreateMenuItem("Help", $hel) $updchk = GUICtrlCreateMenuItem("Check for updates", $hel) $aboutlmp = GUICtrlCreateMenuItem("About LMP", $hel) $PosSlider = GUICtrlCreateSlider(8, 100, 614, 42) GUICtrlSetBkColor($PosSlider,0xD8E4F8) GUICtrlSetState($PosSlider,$GUI_DISABLE) If FileReadLine($inipath,4) = "Enabled=1" Then $tray_hide = TrayCreateItem ("Minimize LMP to tray") TrayCreateItem ("") $tray_Restore = TrayCreateItem ("Restore LMP") TrayCreateItem ("") $tray_exit = TrayCreateItem ("Exit") TrayItemSetState ($tray_Restore,$gui_disable) EndIf $statusbar = _GUICtrlStatusBar_Create($gui) Dim $statusbar_PartsWidth[3] = [150, 400, 650] _GUICtrlStatusBar_SetParts($statusbar, $statusbar_PartsWidth) _GUICtrlStatusBar_SetText($statusbar, "Status :", 0) _GUICtrlStatusBar_SetText($statusbar, "Artist :", 1) _GUICtrlStatusBar_SetText($statusbar, "Title :", 2) GUICtrlSetState($playlist,$GUI_SHOW) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00080000);fade-in GUISetState(@SW_SHOW) GUICtrlSetState($playlist,$GUI_SHOW) _GUIEnhanceAnimateTitle($gui, "L|M|TER Media Player v. " & $cver & " - ? 2008 L|M|TER", $GUI_EN_TITLE_DROP) #EndRegion ### START Koda GUI section ### Form=C:\AutoIt\LMP\lmp.kxf Dim $var, $hour, $min, $sec $filep = "" $pcdir = "" $playlistsong = "" $playlistsong1 = "" $bitrate = "" $tracknr = "" $ttime = "" $comments = "" $protected = "" $copyright = "" $author = "" $genre = "" $year = "" $album = "" $title = "" $artist = "" $remove = "" $status = "" $1b = "" $DoubleClicked = False While 1 $nMsg = GUIGetMsg() $msgt = TrayGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _SoundClose($playlistsong) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000);fade-out Exit Case $play Call("play") Case $browse Call("add") Case $stop Call("stop") Case $pause Call("pause") Case $about Call("about") Case $help Call("help") Case $songinfo Call("songgui") Case $adddir Call("add") Case $settings Call("settings") Case $helpmenu Call("help") Case $updchk Call("updchk") Case $aboutlmp Call("about") Case $addfile AddFile() Case $exit _SoundClose($playlistsong) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000);fade-out Exit EndSwitch If FileReadLine($inipath,4) = "Enabled=1" Then Switch $msgt Case $tray_hide DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00050005) TrayItemSetState ($tray_Restore,$gui_enable) TrayItemSetState ($tray_hide,$gui_disable) Case $tray_Restore TrayItemSetState ($tray_Restore,$gui_disable) TrayItemSetState ($tray_hide,$gui_enable) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x0004000a) Case $tray_exit DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000) Exit EndSwitch EndIf If _SoundStatus($playlistsong) = "playing" Then $1a = _SoundPos($playlistsong, 2) $1b = _SoundLength($playlistsong, 2) $1e = _SoundPos($playlistsong) $1f = _SoundLength($playlistsong) $1c = Round(($1a / $1b) * 100) $1d = Round((($1b - $1a) / 1000) / 60) $txt7 = GUICtrlRead($elapsedt) $txt8 = _SoundPos($playlistsong) If $txt8 <> $txt7 Then GUICtrlSetData($elapsedt, $txt8) $1a1 = StringTrimLeft($1e, 3) $1a2 = StringReplace($1a1, ":", ".") $1b1 = StringTrimLeft($1f, 3) $1b2 = StringReplace($1b1, ":", ".") $1c1 = $1a2 - $1b2 $1c3 = StringReplace($1c1, ".", ":") $1c2 = StringReplace($1c3, "-", "") $txt1 = GUICtrlRead($remainingt) $txt2 = "" If $1c1 <= 10 Then $txt2 = "00:0" & $1c2 If $1c1 > 10 Then $txt2 = "00:" & $1c2 If $txt2 <> $txt1 Then GUICtrlSetData($remainingt, $txt2) EndIf If $DoubleClicked Then DoubleClickFunc() $DoubleClicked = False EndIf Sleep(10) $ci = GUIGetCursorInfo($gui) If $ci[2] = 1 And $ci[4] = $PosSlider Then;user presses on the slider _TicksToTime(GUICtrlRead($PosSlider) / 100 * $1b, $hour, $min, $sec) ToolTip($hour & ":" & $min & ":" & $sec) $var = 1 ContinueLoop EndIf If $var = 1 And $ci[2] = 0 Then;only seek after user releases the slider _SoundSeek($playlistsong, $hour, $min, $sec) _SoundPlay($playlistsong) ToolTip('') $var = 0 EndIf $1a = _SoundPos($playlistsong, 2) $1b = _SoundLength($playlistsong, 2) GUICtrlSetData($PosSlider, $1a / $1b * 100); move the slider as the song progresses If $1a = $1b Then _SoundClose($playlistsong) $1 = GUICtrlRead($remainingt) $2 = "00:00:00" If $2 <> $1 Then GUICtrlSetData($remainingt, $2) $3 = GUICtrlRead($elapsedt) $4 = "00:00:00" If $4 <> $3 Then GUICtrlSetData($elapsedt, $4) $5 = GUICtrlRead($PosSlider) $6 = "00:00:00" If $6 <> $5 Then GUICtrlSetData($PosSlider, $6) sleep(10) _GUICtrlStatusBar_SetText($statusbar,"Status :",0) EndIf WEnd ;~ Functions Func play() GUICtrlSetState($PosSlider,$GUI_ENABLE) GUICtrlSetData($PosSlider, "0") GUICtrlSetData($elapsedt, "00:00:00") GUICtrlSetData($remainingt, "00:00:00") $dbclick1 = GUICtrlRead(GUICtrlRead($playlist)) $dbclick2 = StringTrimRight($dbclick1,1) $dbclick3 = StringSplit($dbclick2,"|") $playlistsong1 = $dbclick3[4] $playlistsong = _SoundOpen($playlistsong1) _SoundPlay($playlistsong) GUICtrlSetState($PosSlider,$GUI_ENABLE) _GUICtrlStatusBar_SetText($statusbar, "Status : Playing ...",0) _GUICtrlStatusBar_SetText($statusbar, "Artist : " & _GetExtProperty($playlistsong1, 16),1) _GUICtrlStatusBar_SetText($statusbar, "Title : " & _GetExtProperty($playlistsong1, 10),2) TraySetToolTip("L|M|TER Media Player v. " & $cver & @CRLF & _GetExtProperty($playlistsong1, 16) & " - " & _GetExtProperty($playlistsong1, 10)) EndFunc ;==>play Func stop() GUICtrlSetData($PosSlider, "0") GUICtrlSetData($elapsedt, "00:00:00") GUICtrlSetData($remainingt, "00:00:00") _SoundStop($playlistsong) _GUICtrlStatusBar_SetText($statusbar, "Status : Stopped ...",0) TraySetToolTip("L|M|TER Media Player v. " & $cver & @CRLF & "Song stopped ...") EndFunc ;==>stop Func pause() If _SoundStatus($playlistsong) = "playing" Then _SoundPause($playlistsong) _GUICtrlStatusBar_SetText($statusbar, "Status : Paused ...",0) TraySetToolTip("L|M|TER Media Player v. " & $cver & @CRLF & "Song paused ...") Else _SoundResume($playlistsong) _GUICtrlStatusBar_SetText($statusbar, "Status : Playing ...",0) EndIf EndFunc ;==>pause Func about() #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("", 324, 234, 303, 219) GUISetBkColor(0xD8E4F8) $GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185) $Image1 = GUICtrlCreatePic($loimg, 16, 24, 289, 73, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Label2 = GUICtrlCreateLabel("Version " & $cver, 16, 112, 72, 17, $WS_GROUP) GUICtrlSetColor(-1, 0x0000FF) $Label4 = GUICtrlCreateLabel("All Rights Reserved.", 16, 160, 100, 17, $WS_GROUP) $Label3 = GUICtrlCreateLabel("Copyright 2008 L|M|TER", 16, 136, 141, 17, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $link = GUICtrlCreateLabel("http://limiter.evonet.ro", 192, 160, 109, 17) GUICtrlSetColor(-1, 0x0000FF) GUICtrlSetCursor (-1, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("&OK", 115, 208, 75, 25) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00080000);fade-in GUISetState(@SW_SHOW) _GUIEnhanceAnimateTitle($Form1, "About L|M|TER Media Player", $GUI_EN_TITLE_DROP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00090000) GUIDelete($Form1) ExitLoop Case $Button1 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00090000) GUIDelete($Form1) ExitLoop Case $link _IECreate("http://limiter.evonet.ro") EndSwitch WEnd EndFunc ;==>about Func help() $Form2 = GUICreate("", 412, 335, 267, 175) GUISetBkColor(0xD8E4F8) $Group1 = GUICtrlCreateGroup("L|M|TER Media Player Help", 5, 5, 400, 290) $Edit1 = GUICtrlCreateEdit("", 15, 25, 380, 259, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetBkColor(-1, 0xD8E4F8) GUICtrlSetData(-1, StringFormat("Thanks for using LMP !\r\n\r\n1. How to play a MP3 or file\r\n\r\nTo play a mp3 or wav file just click " & Chr(34) & "Browse" & Chr(34) & " and select a file then click on\r\nthe " & Chr(34) & "Play" & Chr(34) & " button.\r\n\r\n2. How do I use the playlist ?\r\n\r\nTo use the playlist simply click on the " & Chr(34) & "Add" & Chr(34) & " button and select the file you\r\nwant to add to playlist.To play the song just select it in the playlist and then\r\nclick on the " & Chr(34) & "Play" & Chr(34) & " button.\r\n\r\nIf you have any questions, feel free to send me an e-mail at\r\nrares@funs.co.uk with the subject " & Chr(34) & "LMP" & Chr(34) & ".\r\n\r\nCopyright ?2008 L|M|TER")) GUICtrlCreateGroup("", -99, -99, 1, 1) $helpok = GUICtrlCreateButton("&OK", 165, 300, 75, 25, 0) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 1000, "long", 0x00080000);fade-in GUISetState(@SW_SHOW) _GUIEnhanceAnimateTitle($Form2, "Help", $GUI_EN_TITLE_DROP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 1000, "long", 0x00090000) GUIDelete($Form2) ExitLoop Case $helpok DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 1000, "long", 0x00090000) GUIDelete($Form2) ExitLoop EndSwitch WEnd EndFunc ;==>help Func update() $lmpupdate = GUICreate("LMP - " & $cver, 258, 66, 193, 125) GUISetBkColor(0xD8E4F8) $txt = GUICtrlCreateLabel("There is a new version { " & $nver & " ) of LMP available !", 8, 8, 238, 17) GUICtrlSetCursor(-1, 0) $dldb = GUICtrlCreateButton("Download Now !", 8, 32, 91, 25, 0) $okb = GUICtrlCreateButton("Download Later !", 160, 32, 91, 25, 0) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $lmpupdate, "int", 1000, "long", 0x00080000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($lmpupdate) ExitLoop Case $dldb $newlmp = @ScriptDir & "\lmp.new.exe" GUIDelete($lmpupdate) InetGet("http://limiter.evonet.ro/lmp.exe", $newlmp, 1, 1) If @error Then MsgBox(32, "LMP Update", "There was a problem contacting the update server ..." & @LF & "Please try again later !") GUIDelete($lmpupdate) ExitLoop EndIf While @InetGetActive $i_BytesRead = @InetGetBytesRead $i_DownSize = InetGetSize("http://limiter.evonet.ro/lmp.exe") $percent = Round($i_BytesRead / $i_DownSize * 100) $Time = @SEC $Bytes = Round(@InetGetBytesRead) While @SEC = $Time WEnd $NewBytes = Round(@InetGetBytesRead) $speed = ($NewBytes - $Bytes) /1024 & " KB/s" TrayTip("L|M|TER Media Player", "Please wait while the new version" & @LF & "of LMP is downloading ..." & @LF & $percent & "% ... done - " & $speed, 1, 1) WEnd TrayTip("L|M|TER Media Player", "Please wait while LMP restarts ...", 1) ;exit old v ... starting new v $sFilePath = @TempDir & "\lmp.bat" _FileCreate($sFilePath) $file = FileOpen($sFilePath, 1) FileWrite($file, "taskkill /im lmp.exe" & @CRLF) FileWrite($file, "@echo Starting the new version of LMP" & @CRLF) FileWrite($file, "cd " & @ScriptDir & "\" & @CRLF) FileWrite($file, "del lmp.exe" & @CRLF) FileWrite($file, "rename lmp.new.exe lmp.exe" & @CRLF) FileWrite($file, "lmp.exe" & @CRLF) FileWrite($file, "exit" & @CRLF) FileClose($file) Run($sFilePath, "", @SW_HIDE) Exit ExitLoop Case $okb DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $lmpupdate, "int", 1000, "long", 0x00090000) GUIDelete($lmpupdate) ExitLoop EndSwitch WEnd EndFunc ;==>update Func add() $pcdir = FileSelectFolder("Please select a folder to add to the playlist", @HomeDrive) If @error = 1 Then MsgBox(32, "L|M|TER Media Player", "Please select a folder") ElseIf $pcdir = "" Then MsgBox(32, "L|M|TER Media Player", "Please select a folder") Else Call("pcdir") EndIf EndFunc ;==>add Func pcdir() $filesArray = _FileListToArray($pcdir, "*.mp3") For $i = 1 To $filesArray[0] $path = $pcdir & "\" & $filesArray[$i] $artist1 = _GetExtProperty($path, 16) & "|" $title1 = _GetExtProperty($path, 10) & "|" $album1 = _GetExtProperty($path, 17) & "|" GUICtrlCreateListViewItem($artist1 & $title1 & $album1 & $path, $playlist) Next EndFunc ;==>pcdir Func AddFile() $sFile = FileOpenDialog("Open File", "", "MP3 Audio Files (*.mp3)") If FileExists($sFile) Then $path = $sFile $artist1 = _GetExtProperty($path, 16) & "|" $title1 = _GetExtProperty($path, 10) & "|" $album1 = _GetExtProperty($path, 17) & "|" GUICtrlCreateListViewItem($artist1 & $title1 & $album1 & $path, $playlist) Else MsgBox(0, "Add File", "Please choose a file to add") EndIf EndFunc Func remove() $selected = GUICtrlRead($playlist) GUICtrlDelete($selected) EndFunc ;==>remove Func songgui() #Region ### START Koda GUI section ### Form= $songgui = GUICreate("", 413, 298, 258, 186) GUISetBkColor(0xD8E4F8) $bitrate = GUICtrlCreateLabel("Bit Rate : None", 12, 273, 300, 18) GUICtrlSetFont($bitrate,default,"800") GUICtrlSetData($bitrate, "Bit Rate : " & _GetExtProperty($playlistsong1, 22)) $tracknr = GUICtrlCreateLabel("Track Number : None", 12, 249, 400, 18) GUICtrlSetFont($tracknr,default,"800") GUICtrlSetData($tracknr, "Track Number : " & _GetExtProperty($playlistsong1, 19)) $ttime = GUICtrlCreateLabel("Duration : None", 12, 225, 400, 18) GUICtrlSetFont($ttime,default,"800") GUICtrlSetData($ttime, "Duration : " & _GetExtProperty($playlistsong1, 21)) $comments = GUICtrlCreateLabel("Comments : None", 12, 201, 400, 18) GUICtrlSetFont($comments,default,"800") GUICtrlSetData($comments, "Comments : " & _GetExtProperty($playlistsong1, 14)) $protected = GUICtrlCreateLabel("Protected : None", 12, 177, 400, 18) GUICtrlSetFont($protected,default,"800") GUICtrlSetData($protected, "Protected : " & _GetExtProperty($playlistsong1, 23)) $copyright = GUICtrlCreateLabel("Copyright : None", 12, 153, 400, 18) GUICtrlSetFont($copyright,default,"800") GUICtrlSetData($copyright, "Copyright : " & _GetExtProperty($playlistsong1, 15)) $author = GUICtrlCreateLabel("Author : None", 12, 129, 400, 18) GUICtrlSetFont($author,default,"800") GUICtrlSetData($author, "Author : " & _GetExtProperty($playlistsong1, 9)) $genre = GUICtrlCreateLabel("Genre : None", 12, 105, 400, 18) GUICtrlSetFont($genre,default,"800") GUICtrlSetData($genre, "Genre : " & _GetExtProperty($playlistsong1, 20)) $year = GUICtrlCreateLabel("Year : None", 12, 81, 400, 18) GUICtrlSetFont($year,default,"800") GUICtrlSetData($year, "Year : " & _GetExtProperty($playlistsong1, 18)) $album = GUICtrlCreateLabel("Album : None", 12, 57, 400, 18) GUICtrlSetFont($album,default,"800") GUICtrlSetData($album, "Album : " & _GetExtProperty($playlistsong1, 17)) $title = GUICtrlCreateLabel("Title : None", 12, 33, 400, 18) GUICtrlSetFont($title,default,"800") GUICtrlSetData($title, "Title : " & _GetExtProperty($playlistsong1, 10)) $artist = GUICtrlCreateLabel("Artist : None", 12, 9, 400, 18) GUICtrlSetFont($artist,default,"800") GUICtrlSetData($artist, "Artist : " & _GetExtProperty($playlistsong1, 16)) $ok = GUICtrlCreateButton("&OK", 328, 264, 75, 25, 0) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $songgui, "int", 1000, "long", 0x00080000);fade-in GUISetState(@SW_SHOW) _GUIEnhanceAnimateTitle($songgui, "Song Information", $GUI_EN_TITLE_DROP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $songgui, "int", 1000, "long", 0x00090000) GUIDelete($songgui) ExitLoop Case $ok DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $songgui, "int", 1000, "long", 0x00090000) GUIDelete($songgui) ExitLoop EndSwitch WEnd EndFunc Func updchk() InetGet("http://limiter.evonet.ro/lmp.ver", @TempDir & "\lmp.ver", 1, 1) If @error Then MsgBox(32, "LMP Update", "There was a problem contacting the server, try again later ...") While @InetGetActive WEnd $dat = FileOpen(@TempDir & "\lmp.ver", 0) Global $nver = FileReadLine($dat, 1) FileClose($dat) If $nver = $cver Then MsgBox(32,"L|M|TER Media Player", "There is no new version of LMP ..." & @CRLF & "Current version : " & $cver & @CRLF & "New version : " & $nver) EndIf If $nver > $cver Then Call("update") EndIf EndFunc Func settings() #Region ### START Koda GUI section ### Form= $settingsgui = GUICreate("L|M|TER Media Player Settings", 340, 123, 194, 126) GUISetBkColor(0xD8E4F8) $Group1 = GUICtrlCreateGroup("Auto-Update Feature", 8, 8, 155, 73) $enable = GUICtrlCreateRadio("Enabled ( Recommended )", 16, 32, 145, 17) If FileReadLine($inipath,2) = "Enabled=1" Then GUICtrlSetState($enable, $GUI_CHECKED) $disable = GUICtrlCreateRadio("Disabled", 16, 56, 57, 17) If FileReadLine($inipath,2) = "Enabled=0" Then GUICtrlSetState($disable, $GUI_CHECKED) GUICtrlCreateGroup("", -99, -99, 1, 1) $apply = GUICtrlCreateButton("Apply and exit", 8, 88, 323, 25) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Group2 = GUICtrlCreateGroup("Minimize To Tray", 176, 8, 155, 73) $minenabled = GUICtrlCreateRadio("Enabled ( Recommended )", 184, 32, 145, 17) If FileReadLine($inipath,4) = "Enabled=1" Then GUICtrlSetState($minenabled, $GUI_CHECKED) $mindisabled = GUICtrlCreateRadio("Disabled", 184, 56, 113, 17) If FileReadLine($inipath,4) = "Enabled=0" Then GUICtrlSetState($mindisabled, $GUI_CHECKED) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($settingsgui) ExitLoop Case $apply If GUICtrlRead($enable) = 1 Then IniWriteSection($inipath,"Auto-Update","Enabled=1") If GUICtrlRead($disable) = 1 Then IniWriteSection($inipath,"Auto-Update","Enabled=0") If GUICtrlRead($minenabled) = 1 Then IniWriteSection($inipath,"Minimize To Tray","Enabled=1") If GUICtrlRead($mindisabled) = 1 Then IniWriteSection($inipath,"Minimize To Tray","Enabled=0") GUIDelete($settingsgui) ExitLoop EndSwitch WEnd EndFunc Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam) Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return 0 $code = DllStructGetData($tagNMHDR, 3) If $wParam = $playlist And $code = -3 Then $DoubleClicked = True Return $GUI_RUNDEFMSG EndFunc Func DoubleClickFunc() If _SoundStatus($playlistsong) = "playing" Then _SoundStop($playlistsong) $dbclick1 = GUICtrlRead(GUICtrlRead($playlist)) $dbclick2 = StringTrimRight($dbclick1,1) $dbclick3 = StringSplit($dbclick2,"|") $playlistsong1 = $dbclick3[4] $playlistsong = _SoundOpen($playlistsong1) _SoundPlay($playlistsong) GUICtrlSetState($PosSlider,$GUI_ENABLE) _GUICtrlStatusBar_SetText($statusbar, "Status : Playing ...",0) _GUICtrlStatusBar_SetText($statusbar, "Artist : " & _GetExtProperty($playlistsong1, 16),1) _GUICtrlStatusBar_SetText($statusbar, "Title : " & _GetExtProperty($playlistsong1, 10),2) TraySetToolTip("L|M|TER Media Player v. " & $cver & @CRLF & _GetExtProperty($playlistsong1, 16) & " - " & _GetExtProperty($playlistsong1, 10)) EndFunc Edited February 10, 2008 by BananaFredSoft -ColinSite:www.bananafredsoft.comStuff:Simple Text Editor - MediaPlayer - Animator - BananaDB - BananaNotes - Chatta - Filesearch - Excuse GeneratorMy YouTube channel:http://www.youtube.com/user/colipat
LIMITER Posted February 10, 2008 Author Posted February 10, 2008 (edited) @SwiftI want to announce that LMP VERSION 2 (still have the source,so pm me to get it) had a playlist and a individual song player,but i decided it was too complicated to remain with it (srry guys) ...@BananaFredSoftNICE JOB MAN !!! i will release a version with your improvment and with some bonus things (how can i fix the thing with $tary_hide ?????) thx man !!P.S. - OH ! I ALMOST FORGOT ... I ATTACHED GuiENHACE.au3 TOO !! thx all ! Edited February 10, 2008 by LIMITER
DirtDBaK Posted February 10, 2008 Posted February 10, 2008 check out amp 3direct download link [center][/center]
DirtDBaK Posted February 10, 2008 Posted February 10, 2008 A bug I found if I click the song in the listview and then I click the play button 10 times it plays 10 copies of that song [center][/center]
LIMITER Posted February 10, 2008 Author Posted February 10, 2008 (edited) A bug I found if I click the song in the listview and then I click the play button 10 times it plays 10 copies of that songI'm fixing it right now EDIT : FIXED ! Thx DBak Edited February 10, 2008 by LIMITER
LokErik Posted February 10, 2008 Posted February 10, 2008 Nice a lot longer then my calculater, I´m shall test it now The first error is one step closer to the perfect program.
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