Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Sound.au3>
- #include <GuiAVI.au3>
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <SliderConstants.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- Global $position
- Global $paus ; Muss da nich nen e hinter?^^
- Global $lang
- Global $soundplay
- #Region ### START Koda GUI section ### Form=
- $Form1_1 = GUICreate("Music Player", 609, 470, 194, 126)
- $Label1 = GUICtrlCreateLabel("Position", 8, 392, 41, 17)
- $posi = GUICtrlCreateInput("", 56, 392, 65, 21)
- $Verbleibend = GUICtrlCreateLabel("Länge", 136, 392, 60, 17)
- $bleibender = GUICtrlCreateInput("", 208, 392, 57, 21)
- $Label2 = GUICtrlCreateLabel("Lautstärke", 8, 416, 54, 17)
- $Slider = GUICtrlCreateSlider(0, 432, 606, 45)
- GUICtrlSetData(-1,50)
- $Play = GUICtrlCreateButton("Play", 368, 392, 75, 25, 0)
- $Pause = GUICtrlCreateButton("Pause", 448, 392, 75, 25, 0)
- $Stop = GUICtrlCreateButton("Stop", 528, 392, 75, 25, 0)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- HotKeySet("{^}")
- Func _$Play
- $re =FileOpenDialog("Öffnen",@DesktopDir,"Alle Musikdateien(*.mp3;*.wma;*.aac,*.wav)")
- EndFunc
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Cse $Play
- If $paus = 1 Then
- _SoundResume($re)
- $paus = 0
- Else
- _SoundPlay($re)
- EndIf
- Case $Pause
- _SoundPause($re)
- $paus = 1
- Case $Stop
- _SoundStp($re)
- EndSwitch
- SoundSetWaveVolume(GUICtrlRead($Slider1))
- $position = _SoundPos($re,1)
- GUICtrlSetData($posi,$position)
- $lang = _SoundLngth($re,1)
- GUICtrlSetData($bleibend,$lang)
- WEnd
Add Comment
Please, Sign In to add comment