
regarder ce code et vous allez comprendre
Code : Tout sélectionner
#include <GuiConstants.au3>
GUICreate("test")
$pomme=GUICtrlCreateCheckbox("Acheter 10 pommes ",10,10)
$poire=GUICtrlCreateCheckbox("Acheter 5 poires ",10,30)
$bannane=GUICtrlCreateCheckbox("Acheter 8 bannanes",10,50)
GUICtrlCreateLabel("Nombre total de fruits : ",40,80)
$total= GuiCtrlCreateLabel("0",175, 80, 50, 18,0x1000)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
if $pomme=$msg and $poire=$msg and $bannane=$msg Then
$pomme=10
$poire=5
$bannane=8
$toto=$pomme+$bannane+$poire
GuiCtrlSetData($total,$toto)
EndIf
if $msg = $GUI_EVENT_CLOSE Then
Exit
EndIf
WEnd
SVP aidez moi.