Hi wenn ich hier bei _soundplay die 0 auf 1 setzte spielt es zwar ab aber ich kann nicht stoppen etc.
wenn es auf 0 bleibt spielt es garnicht ab.
Was ist falsch ?
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Sound.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 269, 245, 286, 300)
$MenuItem1 = GUICtrlCreateMenu("Datei")
$MenuItem4 = GUICtrlCreateMenuItem("Öffnen", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenuItem("Beenden", $MenuItem1)
$Button1 = GUICtrlCreateButton("Play", 8, 168, 43, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Stop", 56, 168, 43, 41, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $var=false
[/autoit][autoit][/autoit][autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MenuItem4
$Data=FileOpenDialog("Datei","","Datei (*.mp3)")
Case $MenuItem2
Exit
Case $Button1
$SoundPlay=_SoundOpen($Data,"Notify")
_SoundPlay($SoundPlay,0)
_SoundClose($SoundPlay)
Case $Button2
_SoundPause($SoundPlay)
EndSwitch
WEnd