Désolé pour le titre peu explicite.
Dans l'aide GUI Reference - MessageLoop Mode, l'exemple contient :
Code : Tout sélectionner
Local $iMsg = 0
While 1
$iMsg = GUIGetMsg()
Switch $iMsg
Case $iOKButton
MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the OK button.")
Case $GUI_EVENT_CLOSE
MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the Close button. Exiting...")
ExitLoop
EndSwitch
WEnd
Code : Tout sélectionner
While 1
Switch GUIGetMsg()
Case $iOKButton
MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the OK button.")
Case $GUI_EVENT_CLOSE
MsgBox($MB_SYSTEMMODAL, "GUI Event", "You selected the Close button. Exiting...")
ExitLoop
EndSwitch
WEnd