Hallo Com.
Der titel sagt alles will mit einem button eine andere func in der eine while ist abbrechen ohne das ganze script zu beenden villt kann man da auch was mit for machen pls help
mein jetziges script
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("", 318, 154, 548, 312)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("", 15, 15, 301, 23)
GUICtrlSetFont(-1, 12, 800, 0, "Arial")
GUICtrlSetColor(-1, 0xFFFFFF)
$Button1 = GUICtrlCreateButton("Start", 15, 105, 76, 31, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Button2 = GUICtrlCreateButton("Stop", 120, 105, 76, 31, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Global $status = 0
countdown()
Case $Button1
countdownstop()
EndSwitch
WEnd
Func countdown()
While 1
Sleep(1000)
TrayTip("lol","lol",1)
If $status = 1 Then ExitLoop
[/autoit] [autoit][/autoit] [autoit]WEnd
EndFunc
Func countdownstop()
Global $status = 1
EndFunc