Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstants.au3>
- #include <Sound.au3>
- #include <WindowsConstants.au3>
- #NoTrayIcon
- Global $File
- $Form1_1 = GUICreate("Musik Player v0.1 BETA", 257, 309, 224, 193)
- $Label1 = GUICtrlCreateLabel("Datei Öffnen:", 16, 16, 67, 17)
- $Button1 = GUICtrlCreateButton("...", 88, 16, 33, 17, 0)
- $Button2 = GUICtrlCreateButton("Abspielen", 8, 200, 105, 41, 0)
- $Button3 = GUICtrlCreateButton("Pausieren", 112, 200, 105, 41, 0)
- $Button4 = GUICtrlCreateButton("Beenden", 112, 240, 105, 41, 0)
- $Button5 = GUICtrlCreateButton("Fortsetzen", 8, 240, 105, 41, 0)
- $Checkbox1 = GUICtrlCreateCheckbox("Widerholen", 16, 72, 97, 17)
- $Slider1 = GUICtrlCreateSlider(16, 120, 113, 41)
- GUISetState(@SW_SHOW)
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- $File = FileOpenDialog( "Musik Datei Wählen", @ScriptDir & "\", "Musik (*.mp3;*.mp4;*.avi*)", 1 + 2)
- if $File = True Then
- $M1 = MsgBox(0x1, "OK", "Du kannst nun das Lied Abspielen !")
- Else
- $M2 = MsgBox( 0x1, "Error", @error &"Sry du hast irgendetwas falsch gemacht")
- Endif
- Case $Button2
- _SoundOpen( $File )
- _SoundPlay( $File )
- Case $Button3
- _SoundPause ( $File )
- Case $Button4
- Exit
- Case $Button5
- _SoundResume( $File )
- Case $Checkbox1
- If $Checkbox1 = 1 Then
- While 1
- Sleep( 2000 )
- _SoundOpen( $File )
- _SoundPlay( $File )
- _SoundClose( $File )
- WEnd
- EndIf
- Case $Slider1
- SoundSetWaveVolume( $Slider1 )
- EndSwitch
- WEnd
Add Comment
Please, Sign In to add comment