Mein Problem ist das sobald ich start drücke es läuft aber wenn ich den stop button klicke es sich nicht schließt geschweige denn aufhört!
Könnte mir jemand sagen was ich falsch mache habe schon mit exitloop rum probiert aber nichts hinbekommen :D .
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Blablablabla", 309, 216, 192, 124)
$Start = GUICtrlCreateButton("Start", 24, 16, 145, 73)
$Stop = GUICtrlCreateButton("Stop", 24, 96, 145, 73)
GUISetState(@SW_SHOW)
Main()
#EndRegion ### END Koda GUI section ###
Func Main()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
Start()
Case $Stop
Ende()
EndSwitch
WEnd
EndFunc
Func Start()
While 1
Sleep(6000)
Send("j")
Sleep(1000)
send("p")
WEnd
EndFunc
Func Ende()
Exit
EndFunc
Könnte mir jemand sagen was ich falsch mache habe schon mit exitloop rum probiert aber nichts hinbekommen :D .
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Blablablabla", 309, 216, 192, 124)
$Start = GUICtrlCreateButton("Start", 24, 16, 145, 73)
$Stop = GUICtrlCreateButton("Stop", 24, 96, 145, 73)
GUISetState(@SW_SHOW)
Main()
#EndRegion ### END Koda GUI section ###
Func Main()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
Start()
Case $Stop
Ende()
EndSwitch
WEnd
EndFunc
Func Start()
While 1
Sleep(6000)
Send("j")
Sleep(1000)
send("p")
WEnd
EndFunc
Func Ende()
Exit
EndFunc