Guest User

Untitled

a guest
Jun 21st, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. #include <Sound.au3>
  2. #include <GuiAVI.au3>
  3. #include <ButtonConstants.au3>
  4. #include <EditConstants.au3>
  5. #include <GUIConstantsEx.au3>
  6. #include <SliderConstants.au3>
  7. #include <StaticConstants.au3>
  8. #include <WindowsConstants.au3>
  9.  
  10. Global $position
  11. Global $paus ; Muss da nich nen e hinter?^^
  12. Global $lang
  13. Global $soundplay
  14.  
  15.  
  16.  
  17. #Region ### START Koda GUI section ### Form=
  18. $Form1_1 = GUICreate("Music Player", 609, 470, 194, 126)
  19. $Label1 = GUICtrlCreateLabel("Position", 8, 392, 41, 17)
  20. $posi = GUICtrlCreateInput("", 56, 392, 65, 21)
  21. $Verbleibend = GUICtrlCreateLabel("Länge", 136, 392, 60, 17)
  22. $bleibender = GUICtrlCreateInput("", 208, 392, 57, 21)
  23. $Label2 = GUICtrlCreateLabel("Lautstärke", 8, 416, 54, 17)
  24. $Slider = GUICtrlCreateSlider(0, 432, 606, 45)
  25. GUICtrlSetData(-1,50)
  26. $Play = GUICtrlCreateButton("Play", 368, 392, 75, 25, 0)
  27. $Pause = GUICtrlCreateButton("Pause", 448, 392, 75, 25, 0)
  28. $Stop = GUICtrlCreateButton("Stop", 528, 392, 75, 25, 0)
  29. GUISetState(@SW_SHOW)
  30. #EndRegion ### END Koda GUI section ###
  31.  
  32.  
  33.  
  34.  
  35.  
  36. HotKeySet("{^}")
  37.  
  38. Func _$Play
  39. $re =FileOpenDialog("Öffnen",@DesktopDir,"Alle Musikdateien(*.mp3;*.wma;*.aac,*.wav)")
  40. EndFunc
  41.  
  42. While 1
  43. $nMsg = GUIGetMsg()
  44. Switch $nMsg
  45. Case $GUI_EVENT_CLOSE
  46. Exit
  47. Cse $Play
  48. If $paus = 1 Then
  49. _SoundResume($re)
  50. $paus = 0
  51. Else
  52. _SoundPlay($re)
  53. EndIf
  54. Case $Pause
  55. _SoundPause($re)
  56. $paus = 1
  57.  
  58. Case $Stop
  59. _SoundStp($re)
  60. EndSwitch
  61. SoundSetWaveVolume(GUICtrlRead($Slider1))
  62. $position = _SoundPos($re,1)
  63. GUICtrlSetData($posi,$position)
  64. $lang = _SoundLngth($re,1)
  65. GUICtrlSetData($bleibend,$lang)
  66. WEnd
Add Comment
Please, Sign In to add comment