nobbe Posted February 26, 2008 Posted February 26, 2008 hi i tested v 3.2.8 some comments - when adding a directory to playlist , it wont close status window after all files were added ? - volume slider goes upside down ( you would need to do a 100 - value ...) to make the volume on top to be loudest - playlist is not saved ? not useful to load from directory over and over again - bitmaps are still on hardcoded drive ? - settings should be read on startup BEFORE splash screen, etc ( not every body likes splashscreen and fading in/out windows) - drag / drop of files should be added ( i show some basic code ) nobbe Global $WM_DROPFILES = 0x233 Global $gaDropFiles[1], $str = "" GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES_FUNC") $main = GUICreate("ALL ", 764, 578, 250, 206, $GUI_SS_DEFAULT_GUI, $WS_EX_ACCEPTFILES) ; ; drop my files here in listview ; Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam) Local $nSize, $pFileName Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255) For $i = 0 To $nAmt[0] - 1 $nSize = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0) $nSize = $nSize[0] + 1 $pFileName = DllStructCreate("char[" & $nSize & "]") DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", DllStructGetPtr($pFileName), "int", $nSize) ReDim $gaDropFiles[$i + 1] $gaDropFiles[$i] = DllStructGetData($pFileName, 1) $pFileName = 0 Next EndFunc ;==>WM_DROPFILES_FUNC
LIMITER Posted February 26, 2008 Author Posted February 26, 2008 (edited) @Bert The slider problem it's too much for me ... can't understand why it doesn't run properly ... (on my pc it runs perfectly)@nobbe-The status window closes for me ... -I'll fix the volume slider soon ...-The next version will save the playlist ...-I'll change the location of the bitmaps -Well ... I like the splash screen ... but I'l change that too -And finally i will add a DRAG-AND-DROP Function on the playlist SO ...The new version ... on which i will start working on this week-end .. will be faster (i hope - because i want to make the While loop smaller ...), will have a drag 'n drop function,auto-save function,and many more ... STAY TUNED Expected release date : Between 1 and 10 March ( maybe faster ... depending on my spare time ) Edited February 26, 2008 by LIMITER
nobbe Posted February 26, 2008 Posted February 26, 2008 hi i changed the dir loading function to work here now . i guess something is wrong with the progress bar . you might want to put in in main dialog and show only when needed? the buttons for next / previous file should be image buttons too like (<<) and (>>) - so far you have only a button for next i will work on the drag / drop code and post as soon as im finished.. Func pcdir() If FileReadLine($inipath, 6) = "Enabled=1" Then GUICtrlSetState($playlist, $GUI_HIDE) $filesArray = RecursiveFileSearch($pcdir, "(?i)\.(mp3|wav)") ; ProgressOn("L|M|TER Media Player", "Creating playlist ...", "", -1, -1, 16) For $i = 1 To $filesArray[0] _GUICtrlStatusBar_SetText($statusbar, "Adding file " & $i & " of " & $filesArray[0], 2) $path = $filesArray[$i] $artist1 = _GetExtProperty($path, 16) & "|" $title1 = _GetExtProperty($path, 10) & "|" $album1 = _GetExtProperty($path, 17) & "|" GUICtrlCreateListViewItem($artist1 & $title1 & $album1 & $path, $playlist) #cs $percent = Round($i / $filesArray[0] * 100) ProgressSet($percent, $percent & "% done") #ce ; Sleep(20) ; If $percent >= 100 then ; Return ; EndIf Next If FileReadLine($inipath, 6) = "Enabled=1" Then GUICtrlSetState($playlist, $GUI_SHOW) return EndFunc ;==>pcdir
nobbe Posted February 26, 2008 Posted February 26, 2008 hi i changed the dir loading function to work here now . i guess something is wrong with the progress bar . you might want to put in in main dialog and show only when needed? the buttons for next / previous file should be image buttons too like (<<) and (>>) - so far you have only a button for next i will work on the drag / drop code and post as soon as im finished.. Func pcdir() If FileReadLine($inipath, 6) = "Enabled=1" Then GUICtrlSetState($playlist, $GUI_HIDE) $filesArray = RecursiveFileSearch($pcdir, "(?i)\.(mp3|wav)") ; ProgressOn("L|M|TER Media Player", "Creating playlist ...", "", -1, -1, 16) For $i = 1 To $filesArray[0] _GUICtrlStatusBar_SetText($statusbar, "Adding file " & $i & " of " & $filesArray[0], 2) $path = $filesArray[$i] $artist1 = _GetExtProperty($path, 16) & "|" $title1 = _GetExtProperty($path, 10) & "|" $album1 = _GetExtProperty($path, 17) & "|" GUICtrlCreateListViewItem($artist1 & $title1 & $album1 & $path, $playlist) #cs $percent = Round($i / $filesArray[0] * 100) ProgressSet($percent, $percent & "% done") #ce ; Sleep(20) ; If $percent >= 100 then ; Return ; EndIf Next If FileReadLine($inipath, 6) = "Enabled=1" Then GUICtrlSetState($playlist, $GUI_SHOW) return EndFunc ;==>pcdir
nobbe Posted February 26, 2008 Posted February 26, 2008 hm sorry for double posting . the web server keeps crashing?? all code changes i did for drag & drop ;;; all drag / drop file related changes Global $WM_DROPFILES = 0x233 Global $gaDropFiles[1], $str = "" GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES_FUNC") ; my function $gui = GUICreate("", 634, 465, 190, 121, $GUI_SS_DEFAULT_GUI, $WS_EX_ACCEPTFILES) ; ; ; Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam) Local $nSize, $pFileName Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255) ConsoleWrite("WM_DROPFILES_FUNC " & @LF); For $i = 0 To $nAmt[0] - 1 $nSize = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0) $nSize = $nSize[0] + 1 $pFileName = DllStructCreate("char[" & $nSize & "]") DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", DllStructGetPtr($pFileName), "int", $nSize) ReDim $gaDropFiles[$i + 1] $gaDropFiles[$i] = DllStructGetData($pFileName, 1) $pFileName = 0 Next GetDroppedFiles() EndFunc ;==>WM_DROPFILES_FUNC ; ; func GetDroppedFiles() Local $nbrFiles Local $i ConsoleWrite("GetDroppedFiles" & @LF); $nbrFiles = UBound($gaDropFiles) - 1; -- global For $i = 0 To $nbrFiles _GUICtrlStatusBar_SetText($statusbar, "Adding file " & $i & " of " & $nbrFiles, 2) If FileExists($gaDropFiles[$i]) Then $path = $gaDropFiles[$i] $artist1 = _GetExtProperty($path, 16) & "|" $title1 = _GetExtProperty($path, 10) & "|" $album1 = _GetExtProperty($path, 17) & "|" GUICtrlCreateListViewItem($artist1 & $title1 & $album1 & $path, $playlist) EndIf Next endfunc
LIMITER Posted February 26, 2008 Author Posted February 26, 2008 (edited) THX nobbe You just make my life easier with that piece of code (i'l test it right now) ... Cheers ! P.S. The server is crashing more and more often Edited February 26, 2008 by LIMITER
gseller Posted February 26, 2008 Posted February 26, 2008 Sweet Changes!! Volume and the slider is working. Not smoothly but it is working! NICE!
BrettF Posted February 26, 2008 Posted February 26, 2008 Awesome! What I meant was that max should be on top, and min on the bottom of the volume slider Cheers! Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
SxyfrG Posted February 26, 2008 Posted February 26, 2008 Seek slider doesn't work properly and the time lapsed and time remaining for songs are all wrong ( 6 minutes remaining on a 3 minute song? Something is definitely wrong ) and the volume slider is upside down (as Bert stated) They're the only two problems i'm having with your mp3 player. Other than that, 3 thumbs up My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website
LIMITER Posted February 27, 2008 Author Posted February 27, 2008 So ...The seek slider works on some computers ... but on others no ... (don't know the reason)How can i change the slider volume slider to make the max to be on top ? (some code would be great)I'm now working now on the new version,which will be released soon ...I proudly anounce you that the new version is a little smaller ... (managed to make the loop 5-6 lines smaller )... and the drag and drop function is working sweet ... (thx to nobbe) ... the progress is now fixed (no progress though ... now it will show the loaded files in th statusbar (also thx to nobbe) ...I'll accept all kind of help .. if someone makes a piece a code or something that would be nice ...CHEERS TO ALL THAT LIKE LMP AND SUPPORT HIS DEVELOPMENT !
nobbe Posted February 27, 2008 Posted February 27, 2008 (edited) for the volume slider you need to invert by using (100 - value of slider ) to correct it on my own player i did something like $slider_volume = GUICtrlCreateSlider(460, 196, 38, 61, BitOR($TBS_VERT, $TBS_NOTICKS)) GUICtrlSetData(-1, 100) SoundSetWaveVolume(100 - GUICtrlRead($slider_volume)) Edited February 27, 2008 by nobbe
LIMITER Posted February 27, 2008 Author Posted February 27, 2008 Thx nobbe ! (again) I fixed the volume slider now ... and I'm currently focusing on the auto-save function for the playlist ...
LIMITER Posted February 27, 2008 Author Posted February 27, 2008 After such a long time ... (just kidding) ... a new version has finally been released !!!Many new features and some bugfixes HOPE YOU ALL LIKE IT !!!3.2.9
JustinReno Posted February 28, 2008 Posted February 28, 2008 If I try to manually change the volume using Volume Control, it will reset it back to what it was before, and I can only change it using your player.
nobbe Posted February 28, 2008 Posted February 28, 2008 i try version 3.2.9 PLEASE, PLEASE !!!! dont use up all @TEMP @ SCRIPTDIR ,@ WINDOWS, etc ... to store files all over the place please keep all file relative to @scriptdir / .. pictures are also not neccessarily to be placed in temp dir or with fileinstall nobbe
BrettF Posted February 29, 2008 Posted February 29, 2008 i try version 3.2.9PLEASE, PLEASE !!!! dont use up all @TEMP @ SCRIPTDIR ,@ WINDOWS, etc ... to store files all over the place please keep all file relative to @scriptdir / .. pictures are also not neccessarily to be placed in temp dir or with fileinstallnobbeAgreed, keep them in one place. I don't mind them in temp dir, but probably better to put them in a "bin" folder or the like located in the script dir. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
SxyfrG Posted March 3, 2008 Posted March 3, 2008 A tiny little bug ... When you press the browse for media button and then press cancel or close the folder select viewer, the "search" and "next song" buttons become enabled even though there is no playlist loaded. Just thought i'd let you know My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website
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