Hallo @all.
Mein FirePlayer ist fertig! Ich war schon ein paar Tage damit beschäftigt, hatte aber wenig Zeit. Mit dem Veröffentlichen ist mit Oscar mit seinem StarPlayer v2 zuvorgekommen, was aber nicht mein Nachteil sein sollte ($GUI_EVENT_PRIMARYUP hust)
Naja jedenfalls hoffe ich, ihr könnt noch einen AudioPlayer testen und habt euch nicht an der Konkurrenz satt getestet
nene spaß...^^
Im vergleich zu Oscar´s Player ist meiner eh eher David als Goliath
aber jetzt zu code und exe...
Das Script :
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ICO\mond.ico
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_Res_Comment=FirePlayer by Tim Dellmann
#AutoIt3Wrapper_Res_Description=Ein Programm zum abspielen von AudioDateien. Informationen im Programm verfügbar
#AutoIt3Wrapper_Res_Fileversion=1.3
#AutoIt3Wrapper_Res_LegalCopyright=Tim Dellmann
#AutoIt3Wrapper_Res_Language=1031
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <ListViewConstants.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <StatusBarConstants.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
#include <Array.au3>
#include <GuiListView.au3>
#include <Sound.au3>
#include <GuiStatusBar.au3>
#include <GuiListBox.au3>
#include <Misc.au3>
HotKeySet("{F10}", "_sichtbar")
Global $status = ""
Global $volume = 50
Global $WM_DROPFILES = 0x233, $title = "/"
Global $gaDropFiles[1], $str = "", $xxx = True
Dim $thearray[1]
Global $zhler = 0, $oldSound = "", $sound = "", $oldsong = "", $randomplay = False, $x, $time = "", $all = 0, $statemute = False
_reg(".plx")
Opt("TrayMenuMode", 1)
FileInstall("C:\Users\XXX\Desktop\Downloads\kmixdocked_mute.ico", @TempDir & "/mute.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button First.ico", @TempDir & "/first.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Last.ico", @TempDir & "/last.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Pause.ico", @TempDir & "/pause.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Play.ico", @TempDir & "/play.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Stop.ico", @TempDir & "/stop.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\feuerflamme.jpg", @TempDir &"/feuerflamme.jpg")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Add.ico", @TempDir & "/add.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Refresh.ico", @TempDir & "/refresh.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Delete.ico", @TempDir & "/delete.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Close.ico", @TempDir & "/close.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Info.ico", @TempDir &"/info.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\Button Reload.ico", @TempDir & "/reload.ico")
FileInstall("C:\Users\XXX\Desktop\Downloads\playlist.ico", @TempDir &"/playlist.ico")
FileInstall("C:\Users\XXX\Desktop\Downloads\Doc-MusicPlaylist.ico", @TempDir &"/musik.ico")
FileInstall("C:\Users\XXX\Desktop\audioplayer\ICO\mond.ico", @TempDir &"/mond.ico")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("FirePlayer v1.0 by GE IXI TIM (BETA!) Updater folgt!", 743, 626, 240, 117, -1, BitOR($WS_EX_ACCEPTFILES,$WS_EX_WINDOWEDGE))
GUISetIcon(@TempDir &"/mond.ico")
GUISetBkColor(0x000000)
$ListView1 = GUICtrlCreateListView("Name|Interpret|Album|Länge|Größe|KBit/s|Genre|Pfad", 8, 8, 714, 350, BitOR($LVS_REPORT,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS,$WS_BORDER))
GUICtrlSendMsg(-1, 0x101E, 0, 100)
GUICtrlSendMsg(-1, 0x101E, 1, 100)
GUICtrlSendMsg(-1, 0x101E, 2, 100)
GUICtrlSendMsg(-1, 0x101E, 3, 50)
GUICtrlSendMsg(-1, 0x101E, 4, 50)
GUICtrlSendMsg(-1, 0x101E, 5, 50)
GUICtrlSendMsg(-1, 0x101E, 6, 50)
GUICtrlSendMsg(-1, 0x101E, 7, 150)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetState(-1, $Gui_DropAccepted)
$Slider1 = GUICtrlCreateSlider(688, 400, 30, 125, BitOR($TBS_VERT,$TBS_AUTOTICKS,$WS_BORDER))
GUICtrlSetData($Slider1, $volume)
GUICtrlSetTip(-1, "Lautstärke: " & $volume & "%")
$mute = GUICtrlCreateButton("(Not allowed)", 680, 360, 43, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/mute.ico", 0)
GUICtrlSetTip(-1, "Stummschaltung")
$last = GUICtrlCreateButton("(Not allowed)", 8, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/first.ico", 0)
$Group1 = GUICtrlCreateGroup("", 8, 400, 457, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$label_nowtitel = GUICtrlCreateLabel("Aktueller Titel: /", 16, 424, 300, 31)
GUICtrlSetFont(-1, 14, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFFFF00)
$Label_time = GUICtrlCreateLabel("Zeit: 00:00 / 00:00", 16, 456, 216, 34)
GUICtrlSetFont(-1, 16, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFFFF00)
$Progress1 = GUICtrlCreateProgress(16, 496, 438, 17, $PBS_SMOOTH)
$next = GUICtrlCreateButton("(Not allowed)", 168, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/last.ico", 0)
$pause = GUICtrlCreateButton("(Not allowed)", 88, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/pause.ico", 0)
$play = GUICtrlCreateButton("(Not allowed)", 48, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/play.ico", 0)
$stop = GUICtrlCreateButton("(Not allowed)", 128, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/stop.ico", 0)
$delete_selected = GUICtrlCreateButton("(Not allowed)", 248, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/delete.ico", 0)
GUICtrlSetTip(-1, "Ausgewählten Track löschen")
$delete_all = GUICtrlCreateButton("(Not allowed)", 288, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/close.ico", 0)
GUICtrlSetTip(-1, "Komplette Liste löschen")
$infobutton = GUICtrlCreateButton("(Not allowed)", 368, 360, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir &"/info.ico", 0)
GUICtrlSetTip(-1, "Informationen")
$List1 = GUICtrlCreateList("", 480, 408, 193, 114)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
$addfile = GUICtrlCreateButton("(Not allowed)", 8, 536, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/add.ico", 0)
GUICtrlSetTip(-1, "Track hinzufügen")
$Zufallswiedergabe = GUICtrlCreateButton("(Not allowed)", 56, 536, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir & "/refresh.ico", 0)
GUICtrlSetTip(-1, "Zufallswiedergabe anschalten")
$Standartwiedergabe = GUICtrlCreateButton("(Not allowed)", 104, 536, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir &"/reload.ico", 0)
GUICtrlSetTip(-1, "Zufallswiedergabe ausschalten")
$Playlist_Create = GUICtrlCreateButton("(Not allowed)", 152, 536, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir &"/playlist.ico", 0)
GUICtrlSetTip(-1, "Playlist erstellen")
$Playlist_load = GUICtrlCreateButton("(Not allowed)", 200, 536, 36, 36, $BS_ICON)
GUICtrlSetImage(-1, @TempDir &"/musik.ico", 0)
GUICtrlSetTip(-1, "Playlist laden")
$Pic1 = GUICtrlCreatePic(@TempDir & "/feuerflamme.jpg", 240, 520, 436, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Datei = GUICtrlCreateMenu("&Datei")
$end = GUICtrlCreateMenuItem("Beenden", $Datei)
$playlist = GUICtrlCreateMenu("Playlist")
$save_akplayist = GUICtrlCreateMenuItem("Aktuelle Playlist speichern", $playlist)
$Playlist_loadmenu = GUICtrlCreateMenuItem("Eigene Playlist laden", $playlist)
$Playlist_loadold = GUICtrlCreateMenuItem("Letzte benutzte Playlist öffnen", $playlist)
$register = GUICtrlCreateMenuItem("Registrieren", $Datei)
;TraySetClick("9")
$show = TrayCreateItem("Sichtbar (F8)")
$invis = TrayCreateItem("Unsichtbar (F9)")
$beenden = TrayCreateItem("Beenden")
$MenuItem1 = TrayCreateMenu("Steuerung->")
$trayplay = TrayCreateItem("Play", $MenuItem1)
$traypause = TrayCreateItem("Pause", $MenuItem1)
$traystop = TrayCreateItem("Stopp", $MenuItem1)
$wavelabel = GUICtrlCreateLabel("50%", 688, 536, 36, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState()
$aPos = ControlGetPos($Form1, '', $Progress1)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg ($WM_DROPFILES, "WM_DROPFILES_FUNC")
If IsArray($CmdLine) Then
Local $sLength
For $i = 1 To $CmdLine[0]
If StringRight($CmdLine[$i], 4) = '.mp3' And FileExists($CmdLine[$i]) Then _add($CmdLine[$i])
if StringRight($CmdLine[$i], 4) = ".plx" And FileExists($CmdLine[$i]) Then _LoadPlaylist($CmdLine[$i])
Next
EndIf
While 1
_getInfo()
$nMsg = GUIGetMsg()
$tMsg = TrayGetMsg()
Switch $tMsg
Case $traypause
_pause()
Case $traystop
_stop()
Case $trayplay
_play()
Case $invis
$xxx = False
_sichtbar()
Case $show
$xxx = True
_sichtbar()
Case $beenden
_writeLastPlaylist()
Exit
EndSwitch
Switch $nMsg
Case $GUI_EVENT_CLOSE
_writeLastPlaylist()
Exit
Case $save_akplayist
_createPlaylist()
Case $GUI_EVENT_PRIMARYUP
_setPos()
Case $Playlist_load
_LoadPlaylist(FileOpenDialog("Wähle eine Playlist", "", "Playlists(*.plx)"))
Case $Playlist_Create
_createPlaylist()
Case $mute
_setMute()
Case $Playlist_loadold
_readLastPlaylist()
Case $infobutton
MsgBox(0, "Informationen", "FirePlayer von Tim Dellmann, v1.2." & @CRLF & "Funktionen:" & @CRLF & "- Multi-File-Adding per Drag&Drop und Fileopendialog" & @CRLF & "- Playlist erstellen / laden" & @CRLF & "- Letzte erstellte Playlist laden" & @CRLF & "- Benutzerfreundliche Bilder/Icons" & @CRLF & "- Informationen zum aktuellen Track" & @CRLF & "- Löschen einzelner oder aller Lieder in der Playlist" & @CRLF & "- Ins Tray minimieren" & @CRLF & "- Traymenu als Steuerung" & @CRLF & "- Klick auf Fortschrittsbalken lässt Titel zu diesem springen")
Case $Playlist_loadmenu
_LoadPlaylist(FileOpenDialog("Wähle eine Playlist", "", "Playlists(*.plx)"))
Case $Slider1
_check_wave()
Case $addfile
$aArray = FileOpenDialog("Wähle eine Datei", "", "Mp3-Dateien(*mp3)",4)
_add($aArray)
Case $GUI_EVENT_DROPPED
_addDROP()
Case $play
_play()
Case $pause
_pause()
Case $register
_reg(".mp3")
Case $stop
_stop()
Case $ListView1
_play()
Case $next
_next()
Case $last
_last()
Case $delete_all
_delete_all()
Case $delete_selected
_delete_Once()
Case $Zufallswiedergabe
$randomplay = True
Case $Standartwiedergabe
$randomplay = False
EndSwitch
WEnd
Func _addDROP()
For $i = 0 To UBound($gaDropFiles) - 1
if StringRight($gaDropFiles[$i], 4) = ".mp3" or StringRight($gaDropFiles[$i], 4) = ".wma" Then
$x = _ArraySearch($thearray, $gaDropFiles[$i])
if $x = -1 Then
$Data = _GetExtProperty($gaDropFiles[$i], -1)
GUICtrlCreateListViewItem($data[21] & "|" & $data[13] & "|" & $data[14] & "|" & $data[27] & "|" & $data[1] & "|" & $data[28] & "|" & $data[16] & "|" & $gaDropFiles[$i], $ListView1)
_ArrayAdd($thearray, $gaDropFiles[$i])
EndIf
EndIf
Next
$all = UBound($gaDropFiles) + $all
EndFunc
Func _check_wave()
if $statemute = False Then
Global $volume = GUICtrlRead($Slider1)
GUICtrlSetData($wavelabel, $volume & "%")
GUICtrlSetTip($Slider1, "Lautstärke: "&$volume & "%")
SoundSetWaveVolume($volume)
EndIf
EndFunc
Func _add($path)
$xmsg = StringSplit($path, "|")
if IsArray($xmsg) Then
for $i = 1 to $xmsg[0]
$fit = $xmsg[1] & "\" & $xmsg[$i]
if $xmsg[0] = 1 Then $fit = $xmsg[1]
$data = _GetExtProperty($fit, -1)
if IsArray($data) Then GUICtrlCreateListViewItem($data[21] & "|" & $data[13] & "|" & $data[14] & "|" & $data[27] & "|" & $data[1] & "|" & $data[28] & "|" & $data[16] & "|" & $fit, $ListView1)
Next
EndIf
EndFunc
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 ;==>_GetExtProperty
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
Func _play()
if $status = "played" Or $status = "" Then
$status = "played"
$oldsong = $sound
_SoundClose($sound)
$x = _GUICtrlListView_GetItemTextArray($ListView1)
$oldSound = $sound
$sound = _SoundOpen($x[8])
_SoundPlay($sound)
$title = _GetExtProperty($x[8], -1)
GUICtrlSetData($label_nowtitel, $title[21])
_GUICtrlListBox_Destroy($List1)
$List1 = GUICtrlCreateList("", 480, 408, 193, 114)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetData($List1, "1. " & $title[21] & "|" & "2. "&$title[13] & "|" & "3. "&$title[14])
EndIf
if $status = "paused" Then
_SoundResume($sound)
$status = "played"
EndIf
EndFunc
Func _pause()
_SoundPause($sound)
$status = "paused"
$oldSound = $sound
EndFunc
Func _stop()
_SoundStop($sound)
_SoundClose($sound)
GUICtrlSetState($play, @SW_DISABLE)
EndFunc
Func _next()
if $randomplay = True Then
$count = _GUICtrlListView_GetItemCount($ListView1)
$zahl = Random(1, $count, 1)
_GUICtrlListView_ClickItem($ListView1, $zahl)
_play()
EndIf
if $randomplay = False Then
$nxt = _GUICtrlListView_GetNextItem($ListView1)
if $nxt + 1 = _GUICtrlListView_GetItemCount($ListView1) Then $nxt = -1
_GUICtrlListView_ClickItem($ListView1, $nxt +1)
_play()
EndIf
EndFunc
Func _last()
[/autoit] [autoit][/autoit] [autoit]$nxt = _GUICtrlListView_GetNextItem($ListView1)
if $nxt = 0 Then $nxt = _GUICtrlListView_GetItemCount($ListView1)
_GUICtrlListView_ClickItem($ListView1, $nxt -1)
_play()
EndFunc
Func _check_title()
Global $sound
$x = _GUICtrlListView_GetItemTextArray($ListView1)
if $oldSound <> $x[8] Then
$oldSound = $sound
$sound = _SoundOpen($x[8])
EndIf
EndFunc
Func _getInfo()
If $status = "played" Then
Local $iLenMS = _SoundLength($sound, 2)
Local $iPosMS = _SoundPos($sound, 2)
GUICtrlSetData($Progress1, Int(100 / $iLenMS * $iPosMS))
GUICtrlSetData($Label_time, StringTrimLeft(_SoundPos($sound), 3) & "/" & StringTrimLeft(_SoundLength($sound), 3))
if StringTrimLeft(_SoundPos($sound), 3) = StringTrimLeft(_SoundLength($sound), 3) Then _next()
EndIf
EndFunc
Func _delete_Once()
$item = _GUICtrlListView_GetItemTextArray($ListView1)
$index = _ArraySearch($thearray, $item[8])
_ArrayDelete($thearray, $index)
_GUICtrlListView_DeleteItemsSelected($ListView1)
EndFunc
Func _delete_all()
_GUICtrlListView_DeleteAllItems($ListView1)
Global $thearray[10000]
EndFunc
Func _writeLastPlaylist()
$file = @windowsDir & "/LastPlaylist.plx"
FileDelete($file)
_FileWriteFromArray($file, $thearray)
EndFunc
Func _readLastPlaylist()
$file = @windowsDir & "/LastPlaylist.plx"
for $i = 1 to _FileCountLines($file)
$line = FileReadLine($file, $i)
if $line <> "" Then _ArrayAdd($thearray, $line)
Next
For $i = 0 To UBound($thearray) -1
if StringRight($thearray[$i], 4) = ".mp3" or StringRight($thearray[$i], 4) = ".wma" Then
$Data = _GetExtProperty($thearray[$i], -1)
GUICtrlCreateListViewItem($data[21] & "|" & $data[13] & "|" & $data[14] & "|" & $data[27] & "|" & $data[1] & "|" & $data[28] & "|" & $data[16] & "|" & $thearray[$i], $ListView1)
EndIf
Next
EndFunc
Func _LoadPlaylist($thepath)
$plx = $thepath
for $i = 1 to _FileCountLines($plx)
$line = FileReadLine($plx, $i)
if $line <> "" Then _ArrayAdd($thearray, $line)
Next
For $i = 0 To UBound($thearray) -1
if StringRight($thearray[$i], 4) = ".mp3" or StringRight($thearray[$i], 4) = ".wma" Then
$Data = _GetExtProperty($thearray[$i], -1)
GUICtrlCreateListViewItem($data[21] & "|" & $data[13] & "|" & $data[14] & "|" & $data[27] & "|" & $data[1] & "|" & $data[28] & "|" & $data[16] & "|" & $thearray[$i], $ListView1)
EndIf
Next
EndFunc
Func _createPlaylist()
$saveplx = FileSaveDialog("Wähle einen Speicherort", "", "Playlists(*.plx)")
_FileWriteFromArray($saveplx & ".plx", $thearray)
EndFunc
Func _reg($sFileType)
if @Compiled Then
$sREgistryFolder = 'HKEY_CURRENT_USER\Software\Classes\'
if $sFileType = "" Then $sFileType = '.mp3'
$sFileTypeName = 'FirePlayerMP3'
$sFileTypeDescriptopn = 'FirePlayer MP3 Audiodatei'
$sFileTypeIcon = @ScriptFullPath & ',-1'
$sFileTypeOpenCommand = @ScriptFullPath & ' "%1"'
RegWrite($sREgistryFolder & $sFileType, '', 'REG_SZ', $sFileTypeName)
RegWrite($sREgistryFolder & $sFileType, 'Content Type', 'REG_SZ', 'audio/mpeg')
RegWrite($sREgistryFolder & $sFileType, 'PerceivedType', 'REG_SZ', 'audio')
RegWrite($sREgistryFolder & $sFileTypeName, '', 'REG_SZ', $sFileTypeDescriptopn)
RegWrite($sREgistryFolder & $sFileTypeName & '\Defaulticon', '', 'REG_SZ', $sFileTypeIcon)
RegWrite($sREgistryFolder & $sFileTypeName & '\Shell\open\command', '', 'REG_SZ', $sFileTypeOpenCommand)
EndIf
EndFunc
Func _setMute()
if $statemute = True Then
Global $volume = $oldMute
$statemute = False
GUICtrlSetData($wavelabel, $volume & "%")
GUICtrlSetTip($Slider1, "Stummschaltung")
SoundSetWaveVolume($volume)
GUICtrlSetData($Slider1, $oldMute)
Return
EndIf
if $statemute = False Then
Global $oldMute = $volume
$statemute = True
$volume = 0
GUICtrlSetData($wavelabel, $volume & "%")
GUICtrlSetTip($Slider1, "Stummgeschaltet")
SoundSetWaveVolume($volume)
EndIf
EndFunc
Func _sichtbar()
if $xxx = True Then
GUISetState(@SW_SHOW)
$xxx = False
ElseIf $xxx = False Then
GUISetState(@SW_HIDE)
$xxx = True
EndIf
EndFunc
Func _SetPos()
Local $aInfo, $iSoundLenght
$aInfo = GUIGetCursorInfo($Form1)
If @error Then Return
Switch $aInfo[4]
Case $Progress1
If $sound <> -1 Then
Local $aProgrPos = ControlGetPos($Form1, '', $Progress1)
$iPlayPosition = 100 / $aProgrPos[2] * ($aInfo[0] - $aProgrPos[0])
$iSoundLenght = _SoundLength($sound, 2)
$aSoundLenght = _NewTicksToTime($iSoundLenght / 100 * $iPlayPosition)
_SoundSeek($sound, $aSoundLenght[1], $aSoundLenght[2], $aSoundLenght[3])
_SoundPlay($sound)
EndIf
EndSwitch
EndFunc ;==>_SetPos
Func _NewTicksToTime($iTicks, $iStringFormat = False)
Local $iDays, $iHours, $iMins, $iSecs = Int($iTicks / 1000)
$iDays = Int($iSecs / 86400)
$iSecs = Mod($iSecs, 86400)
$iHours = Int($iSecs / 3600)
$iSecs = Mod($iSecs, 3600)
$iMins = Int($iSecs / 60)
$iSecs = Mod($iSecs, 60)
If $iStringFormat Then Return ' ' & $iDays & ' day' & _Iif($iDays <> 1, 's', '') & StringFormat(' %02i:%02i:%02i', $iHours, $iMins, $iSecs)
Local $aTime[4] = [$iDays, $iHours, $iMins, $iSecs]
Return $aTime
EndFunc ;==>_NewTicksToTime
Hier gehts zum Download: http://dellisproggs.npage.de/get_file.php?id=9118617&vnr=252291
Danke für Feedback