Alizame's (Zusammengeklauter ;D ) Player
Hier mein Player mit ganz vielen Codeteilen von Usern aus dem Forum, wo ich mir nicht die Namen aufgeschrieben habe, weil ich nicht dachte,
dass der Player so gut wird, dass ich ihn jemals hier posten würde.
btw: Wenn diese betroffenen User sich melden könnten, wäre total nett.
Also hier das Script:
(Alpha, da über mehrere Monate programmiert wurde, und ich damals noch viel schlechter war als jetzt >.>)
Spoiler anzeigen
#include <Bass.au3>
#include <BassTags.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
#include <File.au3>
#include <Sound.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ProgressConstants.au3>
#include <ButtonConstants.au3>
#include <ListViewConstants.au3>
#include <BassConstants.au3>
#include <StructureConstants.au3>
Opt('GUIOnEventMode', 1)
;~ Opt('MustDeclareVars', 1)
#Region#Init#######################################################################################
Const $sName = "Alizame's Player", $bTray = True
Local $gaDropFiles[1], $iDropItem = -1, $sz = 0, $iPlaylist = "|", $sFile = "", $bListShow = True
Local $iPos, $iSecs, $aInfo, $iPercent,$Datei, $PathSplit, $iNext, $iBack, $sz2, $aString, $aSplit
Local $sListPath, $aSave, $aList, $sListPath, $aList, $sItem, $iRunter = 0.25, $iMaxL = 10, $iMaxR = 10
Local $iNumber, $iValL = 4, $iValR = 4
Local $iPlay = 0 ;0 = stopp, 1 = play, 2 = pause
Global $iPeakL, $iPeakR, $iHigh = 32768, $iLength, $iSeconds, $iOld
Global $iWidth = 500, $sPath, $hSoundOpen, $sID3Tags, $iMuell, $bWiederholen = False;, $bPlay = 0
_BASS_STARTUP('bass\bass.dll')
_Bass_Tags_Startup('bass\BassTags.dll')
_BASS_Init(0, -1, 44100, 0, '')
If @error Then Exit MsgBox(16, '', 'Fehler!' & @CRLF & 'Die Soundkarte konnte nicht initialisiert werden!')
Local $hGui = GUICreate($sName, 560, 450, -1, -1, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x222222)
Local $hLabel = GUICtrlCreateLabel('Select File...', 50, 20, 500, 28)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 14, 400, 0, 'Times New Roman')
GUICtrlSetColor(-1, 0xFFFFAA)
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
GUICtrlCreateLabel('Position', 5, 51, 40, 20, $SS_RIGHT)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
GUICtrlSetColor(-1, 0xFFFFAA)
DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0) ; Classic-Style
Local $hPosition = GUICtrlCreateProgress(50, 50, 500, 20, $PBS_SMOOTH)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetBkColor(-1, 0x333333)
GUICtrlSetColor(-1, 0x600000)
DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 7) ; Standard-Windows-Style
Local $aPos = ControlGetPos($hGui, '', $hPosition)
Local $hDuration = GUICtrlCreateLabel('00:00 / 00:00', 220, 75, 120, 32)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 14, 400, 0, 'Tahoma')
GUICtrlSetColor(-1, 0xFFFFAA)
GUICtrlCreateLabel('Left', 5, 108, 40, 20, $SS_RIGHT)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
GUICtrlSetColor(-1, 0xFFFFAA)
GUICtrlCreateLabel('Right', 5, 138, 40, 20, $SS_RIGHT)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 9, 400, 0, 'Times New Roman')
GUICtrlSetColor(-1, 0xFFFFAA)
Local $Button1 = GUICtrlCreateCheckbox("Wiederholen", 64, 170, 70, 30, BitOR($BS_PUSHLIKE, $BS_AUTOCHECKBOX))
GUICtrlSetResizing(-1, $GUI_DOCKALL)
Local $Button2 = GUICtrlCreateButton("Zurück", 136, 170, 70, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, "_Event_Back")
Local $Button3 = GUICtrlCreateButton("Pause/Play", 208, 170, 70, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, '_Button_Play')
Local $Button4 = GUICtrlCreateButton("Stopp", 280, 170, 70, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, '_Button_Stopp')
Local $Button5 = GUICtrlCreateButton("Vor", 352, 170, 70, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, "_Event_Next")
Local $Button6 = GUICtrlCreateButton("Playlist", 424, 170, 70, 30)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, "_ShowPlaylist")
Local $listview = GUICtrlCreateListView("Name|Länge|Endung|Ort", 5, 225, 550, 185)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 426)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 60)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 0)
GUICtrlSetState($listview, $GUI_DROPACCEPTED)
Local $hWndListView = GUICtrlGetHandle($listview)
GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES_FUNC')
GUIRegisterMsg(0x004E, "_DoubleClickOnListView")
Local $Button7 = GUICtrlCreateButton("Lied hinzufügen", 59, 196 + 220, 105, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent($Button7, "_Event_AddFile")
Local $Button8 = GUICtrlCreateButton("Lied entfernen", 171, 196 + 220, 105, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent($Button8, "_Event_DelFile")
Local $Button9 = GUICtrlCreateButton("Playlist speichern", 283, 196 + 220, 105, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent($Button9, "_Event_Save")
Local $Button10 = GUICtrlCreateButton("Playlist laden", 395, 196 + 220, 105, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent($Button10, "_Event_Load")
GUISetState()
_GDIPlus_Startup()
Local $hBackgr = _GDIPlus_BrushCreateSolid(0xFF222222)
Local $hBrushGreen = _GDIPlus_BrushCreateSolid(0xFF88FF00)
Local $hBrushRed = _GDIPlus_BrushCreateSolid(0xFF7700FF)
Local $hPenGrey = _GDIPlus_PenCreate(0xFF888888, 1)
Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
Local $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, 44, $hGraphic)
Local $hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsFillRect($hBuffer, 0, 0, $iWidth, 44, $hBackgr)
_GDIPlus_GraphicsDrawRect($hBuffer, 0, 0, $iWidth-1, 15, $hPenGrey)
_GDIPlus_GraphicsDrawRect($hBuffer, 0, 27, $iWidth - 1, 15, $hPenGrey)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 50, 110, $iWidth, 44)
AdlibRegister("_VU_Meter", 20)
#EndRegion#Init####################################################################################
While Sleep(100)
[/autoit] [autoit][/autoit] [autoit]If _IsPressed("B3") Then _Button_Play()
If _IsPressed("B2") Then _Button_Stopp()
If _IsPressed("B1") Then _Event_Back()
If _IsPressed("B0") Then _Event_Next()
_VU_Meter()
If _BASS_ChannelIsActive($hSoundOpen) = $BASS_ACTIVE_STOPPED And $bWiederholen = True And $iPlay = 1 Then
_BASS_ChannelPlay($hSoundOpen, 0)
ElseIf _BASS_ChannelIsActive($hSoundOpen) = $BASS_ACTIVE_STOPPED And $iPlay = 1 Then
_Event_Next()
EndIf
$iPos = _BASS_ChannelGetPosition($hSoundOpen, $BASS_POS_BYTE)
$iSecs = Int(_BASS_ChannelBytes2Seconds($hSoundOpen, $iPos))
If $iSecs <> $iOld Then
$iOld = $iSecs
GUICtrlSetData($hDuration, _FormatTime($iSecs, $iSeconds))
EndIf
GUICtrlSetData($hPosition, Int(100 / $iLength * $iPos))
If WinActive($hGui) Then
If BitAND(GUICtrlRead($Button1), 1) Then
$bWiederholen = True
Else
$bWiederholen = False
EndIf
$aInfo = GUIGetCursorInfo($hGui)
If $aInfo[4] = $hPosition And _IsPressed(01) Then
Do
$aInfo = GUIGetCursorInfo($hGui)
$iPercent = 100 / $aPos[2] * ($aInfo[0] - $aPos[0])
GUICtrlSetData($hPosition, $iPercent)
Until Not _IsPressed(01)
_BASS_ChannelSetPosition($hSoundOpen, ($iLength * $iPercent / 100), $BASS_POS_BYTE)
EndIf
If _IsPressed("2E") Then _Event_DelFile()
EndIf
WEnd
#Region#Funcs######################################################################################
Func _ShowPlaylist()
If $bListShow = True Then
;MoveOut
WinActivate($hGui)
_WinSetSize($hGui, 566, 241, 5, 6)
$bListShow = False
Else
;MoveIn
WinActivate($hGui)
_WinSetSize($hGui, 566, 476, 5, 6)
$bListShow = True
EndIf
EndFunc ;==>_ShowPlaylist
Func _Button_Stopp()
_BASS_ChannelStop($hSoundOpen)
GUICtrlSetBkColor($sz, 0xFFFFFF)
GUICtrlSetData($hLabel, "Select File...")
GUICtrlSetData($hDuration, "00:00 / 00:00")
$iPlay = 0
EndFunc ;==>_Button_Stopp
Func _Button_Play()
If $iPlay = 2 Then
_BASS_ChannelPlay($hSoundOpen, 0)
$iPlay = 1
ElseIf $iPlay = 1 Then
_BASS_ChannelPause($hSoundOpen)
$iPlay = 2
ElseIf $iPlay = 0 Then
_Event_Play(20)
$iPlay = 1
EndIf
EndFunc ;==>_Button_Play
Func _VU_Meter()
If Not $hSoundOpen Then Return
;~ _GDIPlus_GraphicsFillRect($hBuffer, 3, 3, $iMaxR + 30, 10, $hBackgr)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBackgr, "int", $iValL, "int", 3, "int", $iMaxL + 3, "int", 10)
;~ _GDIPlus_GraphicsFillRect($hBuffer, 3, 30, $iMaxR + 30, 10, $hBackgr)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBackgr, "int", $iValR, "int", 30, "int", $iMaxR + 3, "int", 10)
Local $iLevel, $iLeft, $iRight, $iSecs, $iValL, $iValR
$iLevel = _BASS_ChannelGetLevel($hSoundOpen)
$iLeft = _LoWord($iLevel)
If $iLeft > 32766 Then $iLeft = 0
$iRight = _HiWord($iLevel)
If $iRight > 32766 Then $iRight = 0
If $iLeft > $iPeakL Then $iPeakL = $iLeft
If $iRight > $iPeakR Then $iPeakR = $iRight
$iValL = $iWidth / $iHigh * $iPeakL
If $iValL > $iWidth - 8 Then $iValL = $iWidth - 8
$iValR = $iWidth / $iHigh * $iPeakR
If $iValR > $iWidth - 8 Then $iValR = $iWidth - 8
$iPeakL -= 1200
$iPeakR -= 1200
Select
Case $iMaxL < $iValL
$iMaxL = $iValL
Case $iMaxL > 4
$iMaxL -= $iRunter
EndSelect
Select
Case $iMaxR < $iValR
$iMaxR = $iValR
Case $iMaxR > 4
$iMaxR -= $iRunter
EndSelect
;~ ;_GDIPlus_GraphicsFillRect($hBuffer, 3, 3, $iValL * 0.9, 10, $hBrushGreen)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushGreen, "int", 3, "int", 3, "int", $iValL, "int", 10)
;~ ;_GDIPlus_GraphicsFillRect($hBuffer, 3, 30, $iValR * 0.9, 10, $hBrushGreen)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushGreen, "int", 3, "int", 30, "int", $iValR, "int", 10)
;~ _GDIPlus_GraphicsFillRect($hBuffer, $iMaxL, 3, 5, 10, $hBrushRed)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushRed, "int", $iMaxL, "int", 3, "int", 5, "int", 10)
;~ _GDIPlus_GraphicsFillRect($hBuffer, $iMaxR, 30, 5, 10, $hBrushRed)
DllCall($ghGDIPDll, "int", "GdipFillRectangleI", "handle", $hBuffer, "handle", $hBrushRed, "int", $iMaxR, "int", 30, "int", 5, "int", 10)
;~ _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 50, 110, $iWidth, 44) ; 3x
DllCall($ghGDIPDll, "int", "GdipDrawImageRectI", "handle", $hGraphic, "handle", $hBitmap, "int", 50, "int", 110, "int", $iWidth, "int", 44)
DllCall($ghGDIPDll, "int", "GdipDrawImageRectI", "handle", $hGraphic, "handle", $hBitmap, "int", 50, "int", 110, "int", $iWidth, "int", 44)
EndFunc ;==>_WM_TIMER
[/autoit] [autoit][/autoit] [autoit]Func _Exit()
AdlibUnRegister()
;~ _Timer_KillAllTimers($hGui)
_BASS_Free()
_GDIPlus_BrushDispose($hBackgr)
_GDIPlus_BrushDispose($hBrushGreen)
_GDIPlus_PenDispose($hPenGrey)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hBuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
Func _FormatTime($iSecs, $iAllSecs)
Local $iMins, $iAllMins
$iMins = Int($iSecs / 60)
$iSecs = Mod($iSecs, 60)
$iAllMins = Int($iAllSecs / 60)
$iAllSecs = Mod($iAllSecs, 60)
Return StringFormat('%02i:%02i / %02i:%02i', $iMins, $iSecs, $iAllMins, $iAllSecs)
EndFunc ;==>_FormatTime
Func _Event_AddFile($sFile = "")
If $sFile = "" Then
$sFile = FileOpenDialog("Dateien Hinzufügen", @MyDocumentsDir, "Musikdateien (*.mp3;*.wav;*.ogg)", 7)
EndIf
If @error Then Return
Dim $szDrive, $szDir, $szFName, $szExt
[/autoit] [autoit][/autoit] [autoit]$Datei = StringSplit($sFile, "|")
If $Datei[0] > 2 Then
For $i = 2 To $Datei[0] Step 1
$PathSplit = _PathSplit($Datei[$i], $szDrive, $szDir, $szFName, $szExt)
If $PathSplit[4] = ".mp3" Or $PathSplit[4] = ".wav" Or $PathSplit[4] = ".ogg" Then
$iSecs = _FormatSecs((_SoundLength($Datei[$i], 2) / 1000))
$iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $Datei[1] & "\" & $Datei[$i], $listview)
$iPlaylist &= String($iID) & "|"
;~ MsgBox(0, "", $iPlaylist)
GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
EndIf
Next
;~ MsgBox(0, "", $iPlaylist)
Else
$PathSplit = _PathSplit($sFile, $szDrive, $szDir, $szFName, $szExt)
If @error Then MsgBox(0, "", "2:" & @error)
$iSecs = _FormatSecs((_SoundLength($sFile, 2) / 1000))
$iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $sFile, $listview)
$iPlaylist &= String($iID) & "|"
GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
EndIf
$sFile = ""
If $iPlay = 0 Then _Event_Play(20)
EndFunc ;==>_Event_AddFile
Func _Event_DelFile()
$iPlaylist = StringReplace($iPlaylist, "|" & String(GUICtrlRead($listview)) & "|", "|")
If $iNumber = GUICtrlRead($listview) Then _Button_Stopp()
GUICtrlDelete(GUICtrlRead($listview))
EndFunc ;==>_Event_DelFile
Func _Event_Next()
$iNext = StringSplit($iPlaylist, "|", 3)
If $iNumber < (UBound($iNext) + 17) Then
For $i = 1 To UBound($iNext) - 1
If String($iNext[$i]) = $iNumber Then
$iNumber = $iNext[$i] + 1
_Event_Play($iNumber)
ExitLoop
EndIf
Next
Else
_Event_Play(20)
EndIf
EndFunc ;==>_Event_Next
Func _Event_Back()
$iBack = StringSplit($iPlaylist, "|", 3)
If $iNumber > 20 Then
For $i = 1 To UBound($iBack)
If String($iBack[$i]) = $iNumber Then
$iNumber = $iBack[$i] - 1
_Event_Play($iNumber)
ExitLoop
EndIf
Next
Else
_Event_Play(UBound($iBack) + 17)
EndIf
EndFunc ;==>_Event_Back
Func _Event_Play($iItemNumber)
If $iItemNumber = "" Or $iItemNumber < 0 Or $iItemNumber = 1 Then $iItemNumber = 8
GUICtrlSetBkColor($sz, 0xFFFFFF)
$sz = $iItemNumber
$iNumber = $iItemNumber
$sz2 = GUICtrlRead($iItemNumber)
;name|länge|endung|ort
$aString = StringSplit($sz2, '|', 1) ;$aString[4] = %ORT%
If @error Or $aString[0] = 1 Then Return
$iPlay = String($sz)
GUICtrlSetBkColor($sz, 0xA0A0A0)
If $hSoundOpen <> '' Then _BASS_ChannelStop($hSoundOpen)
$hSoundOpen = _BASS_StreamCreateFile(False, $aString[4], 0, 0, BitOR($BASS_STREAM_PRESCAN, $BASS_STREAM_AUTOFREE))
_BASS_ChannelPlay($hSoundOpen, 0)
$iPlay = 1
$iLength = _BASS_ChannelGetLength($hSoundOpen, $BASS_POS_BYTE)
$iSeconds = _BASS_ChannelBytes2Seconds($hSoundOpen, $iLength)
GUICtrlSetData($hDuration, _FormatTime(0, $iSeconds))
$sID3Tags = _Bass_Tags_Read($hSoundOpen, '%IFV2(%ARTI,%ARTI,no artist) - %IFV2(%TITL,%TITL,no title)')
$sID3Tags = StringReplace($sID3Tags, '&', '&&')
If $sID3Tags <> "" And $sID3Tags <> " " And $sID3Tags <> "no artist - no title" And $sID3Tags <> "0" Then
GUICtrlSetData($hLabel, $sID3Tags)
TrayTip($sName,$sID3Tags,5)
Else
$aSplit = _PathSplit($aString[4], $iMuell, $iMuell, $iMuell, $iMuell)
;~ GUICtrlSetData($hLabel, $sID3Tags)
GUICtrlSetData($hLabel, $aSplit[3])
TrayTip($sName,$aSplit[3]&$aSplit[4],5)
EndIf
EndFunc ;==>_Event_Play
Func _Event_Save()
$sListPath = FileSaveDialog("Speicherort der Playlist wählen!", @MyDocumentsDir, "Playlist (*.m3u)")
If @error Then Return
If StringRight($sListPath, 4) <> ".m3u" Then $sListPath &= ".m3u"
$aSave = StringSplit($iPlaylist, "|", 3)
Local $hFile = FileOpen($sListPath, 2)
If @error Then
MsgBox(16, "Error!", "Save Error!")
Return
EndIf
For $i = 1 To UBound($aSave) - 2
$aList = StringSplit(GUICtrlRead($aSave[$i]), '|', 1) ;$aString[4] = %ORT%
If IsArray($aList) And $aList[0] = 5 Then
FileWriteLine($hFile, $aList[4])
EndIf
Next
FileClose($hFile)
EndFunc ;==>_Event_Save
Func _Event_Load()
$sListPath = FileOpenDialog("Playlist wählen!", @MyDocumentsDir, "Playlist (*.m3u)")
$aList = StringSplit(FileRead($sListPath), @CRLF, 1)
If IsArray($aList) Then
For $i = 1 To $aList[0] - 1
_Event_AddFile($aList[$i])
Next
EndIf
EndFunc ;==>_Event_Save
Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam)
Local $nSize, $pFileName
Local $szDrive, $szDir, $szFName, $szExt
Local $nAmt = DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', 0xFFFFFFFF, 'ptr', 0, 'int', 0)
For $i = 0 To $nAmt[0] - 1
$nSize = DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', $i, 'ptr', 0, 'int', 0)
$nSize = $nSize[0] + 1
$pFileName = DllStructCreate('wchar[' & $nSize & ']')
DllCall('shell32.dll', 'int', 'DragQueryFileW', 'hwnd', $wParam, 'int', $i, 'ptr', DllStructGetPtr($pFileName), 'int', $nSize)
ReDim $gaDropFiles[$i + 1]
$gaDropFiles[$i] = DllStructGetData($pFileName, 1)
$pFileName = 0
$PathSplit = _PathSplit($gaDropFiles[$i], $szDrive, $szDir, $szFName, $szExt)
If $PathSplit[4] = ".mp3" Or $PathSplit[4] = ".wav" Or $PathSplit[4] = ".ogg" Then
$iSecs = _FormatSecs((_SoundLength($gaDropFiles[$i], 2) / 1000))
$iID = GUICtrlCreateListViewItem($PathSplit[3] & "|" & $iSecs & "|" & $PathSplit[4] & "|" & $PathSplit[0], $listview)
$iPlaylist &= String($iID) & "|"
GUICtrlSendMsg($listview, $LVM_SETCOLUMNWIDTH, 3, 0)
If $iPlay = "" Then _Event_Play(20)
EndIf
Next
EndFunc ;==>WM_DROPFILES_FUNC
Func _DoubleClickOnListView($hWndGUI, $msgID, $wParam, $lParam)
Local $tagNMHDR, $event, $hwndFrom, $code
$tagNMHDR = DllStructCreate("int;int;int", $lParam)
If @error Then Return
$event = DllStructGetData($tagNMHDR, 3)
If $wParam = $listview Then
If $event = $NM_DBLCLK Then
$sItem = GUICtrlRead($listview)
If $sItem <> 0 Then
_Event_Play($sItem)
EndIf
EndIf
EndIf
$tagNMHDR = 0
$event = 0
$lParam = 0
EndFunc ;==>_DoubleClickOnListView
Func _FormatSecs($iAllSecs)
Local $iAllMins
$iAllMins = Int($iAllSecs / 60)
$iAllSecs = Mod($iAllSecs, 60)
Return StringFormat('%02i:%02i', $iAllMins, $iAllSecs)
EndFunc ;==>_FormatSecs
Func _WinSetSize($hWnd, $iWidth, $iHeigth, $iSleep = -1, $iStep = 4) ;by Gta Spider
If $iSleep < 0 Then Return WinMove($hWnd, "", Default, Default, $iWidth, $iHeigth)
Local $i, $iStepW = $iStep, $iStepH = $iStep, $iSin, $i2, $iLastI
Local $aWinPos = WinGetPos($hWnd)
If $iWidth < $aWinPos[2] Then $iStepW *= -1
If $iHeigth < $aWinPos[3] Then $iStepH *= -1
Local $iDegToRad = 3.14159265358979 / 180
Local $iSinMulW = ($iWidth - $aWinPos[2]) / 2.5
Local $iSinMulH = ($iHeigth - $aWinPos[3]) / 2.5
If $iSinMulW < 0 Then $iSinMulW *= -1
If $iSinMulH < 0 Then $iSinMulH *= -1
If $iWidth <> $aWinPos[2] Then
For $i = $aWinPos[2] To $iWidth Step $iStepW
$iLastI = $i
$iSin = $i - $aWinPos[2]
$iSin = Sin($iDegToRad * (180 * $iSin / ($iWidth - $aWinPos[2])))
WinMove($hWnd, "", Default, Default, $i + ($iSin * $iSinMulW), Default)
_VU_Meter()
Sleep($iSleep)
Next
If Mod($iWidth - $aWinPos[2], $iStep) Then
If $iStepW < 0 Then
$iStepW = -1
Else
$iStepW = 1
EndIf
For $i = $iLastI - 1 To $iWidth Step $iStepW
WinMove($hWnd, "", Default, Default, $i, Default)
_VU_Meter()
Next
EndIf
EndIf
If $iHeigth <> $aWinPos[3] Then
For $i = $aWinPos[3] To $iHeigth Step $iStepH
$iLastI = $i
$iSin = $i - $aWinPos[3]
$iSin = Sin($iDegToRad * (180 * $iSin / ($iHeigth - $aWinPos[3])))
WinMove($hWnd, "", Default, Default, Default, $i + ($iSin * $iSinMulH))
_VU_Meter()
Sleep($iSleep)
Next
If Mod($iHeigth - $aWinPos[3], $iStep) Then
If $iStepH < 0 Then
$iStepH = -1
Else
$iStepH = 1
EndIf
For $i = $iLastI - 1 To $iHeigth Step $iStepH
WinMove($hWnd, "", Default, Default, Default, $i)
_VU_Meter()
Next
EndIf
EndIf
EndFunc
#EndRegion#Funcs###################################################################################
Nochmal für blinde: in dem spoiler ist der Source!
Exe als Anhang.
_______________________________
Edit: Sogar ein Teil des Designs ist geklaut^^