Hallo
also ich hab da ein kleines problem mit einer schleife ich versteh nicht was ich falsch mache
erst hatte ich die schleife in der funktion start aber hab gelesen das das nicht so gut ist .
bin noch ziemlich neu
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $zahl = 1
Global $loop = 0
[/autoit][autoit][/autoit][autoit]$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$start = GUICtrlCreateButton("start", 0, 400, 153, 33)
$exit = GUICtrlCreateButton("aus", 432, 400, 153, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $exit
aus ()
Case $start
start ()
EndSwitch
WEnd
Func aus ()
($loop = 0)
Sleep (2000)
Exit
EndFunc
Func start ()
$loop = 1
EndFunc
While(1)
if ($zahl <= 10) And ($loop = 1) Then
Msgbox(0,"",$zahl)
$zahl += 1
[/autoit][autoit][/autoit][autoit]EndIf
if ($zahl >= 9) And ($loop = 1) Then
Sleep (20000)
$zahl = 0
EndIf
WEnd