Ma question est toute bête je veux lancer une boucle type while avec un bouton et l'arrêter avec un autre.
Voici mon script
Code : Tout sélectionner
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 201, 49, 193, 115)
$B1 = GUICtrlCreateButton("Button1", 8, 8, 81, 25)
$B2 = GUICtrlCreateButton("Button1", 104, 8, 81, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $i
Func start()
$i=1
EndFunc
Func quit (()
$i=0
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $B1
start()
while 1
If $i Then
send("a")
EndIf
WEnd
Case $B2
quit()
EndSwitch
WEnd


