also mit den includes funzt das doch? Ich lass die funktion laufen und drück auf X oder mach esc und das script beenden sich.
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 358, 183, 193, 125)
$ok = GUICtrlCreateButton("OK", 80, 56, 161, 81, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ok
_funktion()
EndSwitch
WEnd
Func _funktion() ;"Hauptfunktion"
Beep(500, 50)
Beep(500, 50) ;Während der Beeps soll die GUI abgefragt werden
Beep(500, 50)
Beep(500, 50)
Beep(500, 50)
Beep(500, 50)
Beep(500, 50)
Beep(500, 50)
EndFunc
E: ups lag daran das die beeps so schnell vorbei sind ![]()