Hier mal beide Modi im Vergleich.
Spoiler anzeigen
#include <Sound.au3>
Global $CurrentSound
#region ### START Playlister GUI section ###
GUICreate("Playlister", 283, 224, 634, 131)
$lbl = GUICtrlCreateLabel("", 0, 104, 279, 17)
$bn1 = GUICtrlCreateButton("Open", 48, 40, 75, 22)
$bn2 = GUICtrlCreateButton("Play", 128, 152, 75, 22)
$Pause = GUICtrlCreateButton("Break", 8, 152, 75, 22)
$ckb = GUICtrlCreateCheckbox("Save", 160, 48, 97, 17)
GUICtrlSetState(-1, 1)
GUISetState(@SW_SHOW)
#endregion ### END Playlister GUI section ###
#region ### START Playlister Loop section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
ExitLoop
Case $bn1
_File()
Case $Pause
MsgBox(0, "", "Aus der Schleife - Break !")
;~ _SoundPause($CurrentSound)
Case $bn2
MsgBox(0, "", "Aus der Schleife - Play !")
;~ _SoundResume($CurrentSound)
EndSwitch
WEnd
#endregion ### END Playlister Loop section ###
#region ### START Playlister Func section ###
Func _File()
MsgBox(0, "", "Aus der Funktion - Open !")
EndFunc ;==>_File
#endregion ### END Playlister Func section ###
; Ende
Spoiler anzeigen
#include <Sound.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]Global $CurrentSound
#region ### START Playlister GUI section ###
GUICreate("Playlister", 283, 224, 634, 131)
GUISetOnEvent(-3, "_Func")
$lbl = GUICtrlCreateLabel("", 0, 104, 279, 17)
$bn1 = GUICtrlCreateButton("Open", 48, 40, 75, 22)
GUICtrlSetOnEvent(-1, "_Func")
$bn2 = GUICtrlCreateButton("Play", 128, 152, 75, 22)
GUICtrlSetOnEvent(-1, "_Func")
$Pause = GUICtrlCreateButton("Break", 8, 152, 75, 22)
GUICtrlSetOnEvent(-1, "_Func")
$ckb = GUICtrlCreateCheckbox("Save", 160, 48, 97, 17)
GUICtrlSetState(-1, 1)
GUISetState(@SW_SHOW)
#endregion ### END Playlister GUI section ###
#region ### START Playlister Loop section ###
While Sleep(100)
WEnd
#endregion ### END Playlister Loop section ###
#region ### START Playlister Func section ###
Func _Func()
Switch @GUI_CtrlId
Case -3
Exit
Case 4
MsgBox(0, "", "Aus der Funktion - Open !")
Case 5
MsgBox(0, "", "Aus der Funktion - Play !")
;~ _SoundResume($CurrentSound)
Case 6
MsgBox(0, "", "Aus der Funktion - Break !")
;~ _SoundPause($CurrentSound)
EndSwitch
EndFunc ;==>_Func
#endregion ### END Playlister Func section ###
; Ende